Closed danbjoseph closed 5 years ago
seemed to get a little bit further if the script is run again
(venv) ➜ upload_photos_by_exif git:(master) ✗ find /Users/danbjoseph/Desktop/osc -mindepth 1 -type d -print0 | xargs -L 1 -0 ./upload_exif.py -p
Found 482 pictures to upload
84%|█████████████████████████████████████████▊ 403/482 remaining:00:43 elapsed:02:35multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 372 pictures to upload
19%|█████████▋ 71/372 remaining:03:25 elapsed:00:17multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 343 pictures to upload
85%|██████████████████████████████████████████▌ 292/343 remaining:00:42 elapsed:00:56multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 482 pictures to upload
74%|█████████████████████████████████████ 357/482 remaining:01:01 elapsed:01:32multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 478 pictures to upload
67%|█████████████████████████████████▌ 321/478 remaining:01:26 elapsed:02:46multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 306 pictures to upload
30%|███████████████▍ 93/306 remaining:02:18 elapsed:00:11multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 483 pictures to upload
100%|██████████████████████████████████████████████████ 483/483 remaining:00:00 elapsed:03:17
Finish uploading form dir: /Users/danbjoseph/Desktop/osc/osc42/ with sequence id: 1169155
Found 446 pictures to upload
38%|███████████████████▏ 171/446 remaining:03:02 elapsed:00:13multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 292 pictures to upload
46%|██████████████████████▉ 134/292 remaining:01:44 elapsed:00:55multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found 186 pictures to upload
81%|████████████████████████████████████████▎ 150/186 remaining:00:19 elapsed:00:21multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 79, in __call__
self.make_upload(photo, data_photo)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/photo.py", line 60, in make_upload
if conn.json()['status']['apiMessage'] == ' You are not allowed to add a duplicate entry (sequenceIndex)':
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./upload_exif.py", line 67, in <module>
main()
File "./upload_exif.py", line 58, in main
do_upload(thread, UploadPhoto(path, access_token, id_sequence, count_list, url_photo), photos_path)
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/osc/utils.py", line 67, in do_upload
list(tqdm.tqdm(p.imap(generator, payload), total=len(payload), bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} remaining:{remaining} elapsed:{elapsed}'))
File "/Users/danbjoseph/Documents/Github/openstreetcam/upload-scripts/upload_photos_by_exif/venv/lib/python3.6/site-packages/tqdm/_tqdm.py", line 872, in __iter__
for obj in iterable:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
(venv) ➜ upload_photos_by_exif git:(master) ✗
I met the same error last night, too
( disclaimer: I am a iOS developer on OpenStreetCam ) Hi @kudarisenmon and @danbjoseph from my experience this issue reproduces also on iOS, so from my perspective this is a server bug that happens in the next scenario: server receives the first request for let's say index 1 it sends back a bad formatted JSON response, so the client platform (iOS, Android, upload scripts) will interpret as a failed request and retry the upload for index 1, the server will now respond with an error: ' You are not allowed to add a duplicate entry (sequenceIndex)'. Working solution: On mobile we ignore this error and consider that the server already received the image at index 1 so we upload the next image, this should also be implemented on this scrips. I suspect that the script receives this duplicate error and skip a different index then the one receiving the duplicate error. I will investigate that this is implemented and working accordingly.
Update: Started work on a new upload script to fix this issue.
for the time being, i am using this script which forces the threads to 1 to avoid retry problem, and automagically restarts otherwise. it iterates over subdirectories which helps with my GoPro stuff. it is doing ok.
trap 'exit 1;' INT
python=python3.6
upload_exif=/Users/rwelty/Projects/openstreetcam/upload-scripts-master/upload_photos_by_exif/upload_exif.py
for i in */; do while echo $python $upload_exif -p "$i" -t 1 $python $upload_exif -p "$i" -t 1 [ $? -ne 0 ] do : ; done done
Finally done it! Thanks for your patience! If you find any issues with the new version please create a issue and we will address it as soon as possible.