Checkout error.
sormany opened this issue · comments
After the update to version 0.6.0an, the command checkout
present problems.
$ tst checkout2 sd_acrescimo
Traceback (most recent call last):
File "/home/sy/.tst/commands/tst-checkout2", line 120, in <module>
main(text_in_file)
File "/home/sy/.tst/commands/tst-checkout2", line 98, in main
save(response_json, text_in_file, is_checkout=True)
File "/home/sy/.tst/bin/tstlib.py", line 628, in save_activity
save_yaml(data['name'] + '.yaml', tstyaml)
File "/home/sy/.tst/bin/tstlib.py", line 584, in save_yaml
if '\n' in field_value:
TypeError: argument of type 'NoneType' is not iterable
The directory of the activity is created but contains only the yaml file. This activity also has the reference solution, but it is not downloaded.
$ ls
sd_acrescimo.yaml
$ tst status
This is not a tst directory.
This is happening only with this activity. Why?
@daltonserey, I believe that the problem is only with the activity. In the other activities, the command is working normally.
This error indicates that one of the mandatory fields of your activity is null
(or undefined). For now, I'm gonna update checkout so it saves the activity with the field as null
. However, this requires I patch the commit script. It shouldn't allow a null
value for any of the activity properties.
Just released 0.6.0ap
. Now, whenever an activity is read from the local directory, it is validated. If the activity does not validate the operation is aborted with an appropriate message.