elodie
elodie copied to clipboard
Traceback: ValueError: No JSON object could be decoded
running on OSX, python2.7
Traceback (most recent call last):
File "./elodie.py", line 371, in <module>
main()
File "/Users/rpappalax/git/elodie/venv/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/Users/rpappalax/git/elodie/venv/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/Users/rpappalax/git/elodie/venv/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/rpappalax/git/elodie/venv/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/rpappalax/git/elodie/venv/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "./elodie.py", line 140, in _import
trash, allow_duplicates)
File "./elodie.py", line 67, in import_file
media, allowDuplicate=allow_duplicates, move=False)
File "/Users/rpappalax/git/elodie/elodie/filesystem.py", line 594, in process_file
self.set_utime_from_metadata(media.get_metadata(), dest_path)
File "/Users/rpappalax/git/elodie/elodie/media/base.py", line 93, in get_metadata
'date_taken': self.get_date_taken(),
File "/Users/rpappalax/git/elodie/elodie/media/photo.py", line 61, in get_date_taken
exif = self.get_exiftool_attributes()
File "/Users/rpappalax/git/elodie/elodie/media/media.py", line 130, in get_exiftool_attributes
metadata = et.get_metadata(source)
File "/Users/rpappalax/git/elodie/elodie/external/pyexiftool.py", line 330, in get_metadata
return self.execute_json(filename)[0]
File "/Users/rpappalax/git/elodie/elodie/external/pyexiftool.py", line 312, in execute_json
return json.loads(self.execute(b"-j", *params).decode("utf-8"))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
(venv) temp01:elodie rpappalax$
Hi @rpappalax, I'm going to take a guess and say that there's a problem in the EXIF data in the image it was processing. Seems that Exiftool is returning something uninterpretable.
Is there any chance you know which photo this was happening on and checking it with exiftool on the command line? In the past when I've had troubles like this, my image had some non-utf8 characters, but I believe this was fixed in https://github.com/jmathai/elodie/issues/127