[Solved] Error uploading pictures

I have run video_process on some video files along with a gpx file and wants to upload the pictures with:
mapillary_tools upload --advanced --import_path “images/mapillary_sampled_video_frames/” --number_threads 4 --summarize --save_as_json --verbose --skip_subfolders

This gives:
All images have already been uploaded
Done uploading 0 images.
Traceback (most recent call last):
File “/usr/local/bin/mapillary_tools”, line 6, in
exec(compile(open(file).read(), file, ‘exec’))
File “/home/tryl/almen/scripts/external/new_mapillary_tools/bin/mapillary_tools”, line 76, in
command.run(args)
File “/home/tryl/almen/scripts/external/new_mapillary_tools/mapillary_tools/commands/upload.py”, line 52, in run
post_process(**({k: v for k, v in vars_args.iteritems()
File “/home/tryl/almen/scripts/external/new_mapillary_tools/mapillary_tools/post_process.py”, line 161, in post_process
import_path, skip_subfolders)
File “/home/tryl/almen/scripts/external/new_mapillary_tools/mapillary_tools/processing.py”, line 680, in get_duplicate_file_list
duplicate_file_list.extend(os.path.join(os.path.abspath(root_dir), file) for file in os.listdir(root_dir) if file.lower().endswith(
NameError: global name ‘root_dir’ is not defined

Actually I have not recorded what the first lines gave the first time, but it also finished with the same exception.

The above is after I updated to the latest version from git.

Any suggestion on how to fix this? Any suggestion on how to make the script upload files it believes are uploaded?

It seems that the reason nothing was uploaded is because I used --skip_subfolders and the images from each video file had been placed in a folder. It is only when the script generates a final report it fails - but it does not every time.

The error only seems to come when there is nothing to upload, so I am good now.