Repository: jmathai/elodie

Issue #267: Eastern European locations unicode cause a crash.
Created: 2018-02-23T11:07:48Z
Some locations cause the following crash.
Traceback (most recent call last):
File "./elodie.py", line 345, in 
main()
File "C:\Python27\lib\site-packages\click\core.py", line 716, in call
return self.main(*args, **kwargs)
File "C:\Python27\lib\site-packages\click\core.py", line 696, in main
rv = self.invoke(ctx)
File "C:\Python27\lib\site-packages\click\core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Python27\lib\site-packages\click\core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python27\lib\site-packages\click\core.py", line 534, in invoke
return callback(*args, **kwargs)
File "./elodie.py", line 115, in _import
trash, allow_duplicates)
File "./elodie.py", line 66, in import_file
print('%s -> %s' % (_file, dest_path))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u015b' in position 88: ordinal not in range(128)
Location.json
[{"lat": 49.7838611111111, "name": {"default": "Przemy\u015bl", "city": "Przemy\u015bl", "state": "podkarpackie", "country": "Polska"}, "long": 22.7677916666667}]

Duplicate issue #360: Exiftool Error on 3gp file
Created: 2020-03-16T14:06:44Z
Hello everyone and thank you for your hard work, the improvements are constant and perceivable, I had a one year old version running and the new one blew my mind for its speediness.
I'm facing a problem running elodie against my main library. I've added a simple print before the error on get_exiftool_attributes. Do you have any clues on why this is happening?
error processing file F:\sortedMedia\2005\12\31\video\XXXXXXX.3gp
Traceback (most recent call last):

  File "C:\Users\tomma\Desktop\elodie\elodie.py", line 378, in <module>
    main()
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\tomma\Desktop\elodie\elodie.py", line 141, in _import
    trash, allow_duplicates)
  File "C:\Users\tomma\Desktop\elodie\elodie.py", line 68, in import_file
    media, allowDuplicate=allow_duplicates, move=False)
  File "C:\Users\tomma\Desktop\elodie\elodie\filesystem.py", line 526, in process_file
    metadata = media.get_metadata()
  File "C:\Users\tomma\Desktop\elodie\elodie\media\base.py", line 96, in get_metadata
    'date_taken': self.get_date_taken(),
  File "C:\Users\tomma\Desktop\elodie\elodie\media\video.py", line 69, in get_date_taken
    exif = self.get_exiftool_attributes()
  File "C:\Users\tomma\Desktop\elodie\elodie\media\media.py", line 129, in get_exiftool_attributes
    self.exif_metadata = ExifTool().get_metadata(source)
  File "C:\Users\tomma\Desktop\elodie\elodie\external\pyexiftool.py", line 340, in get_metadata
    return self.execute_json(filename)[0]
  File "C:\Users\tomma\Desktop\elodie\elodie\external\pyexiftool.py", line 322, in execute_json
    return json.loads(self.execute(b"-j", *params).decode("utf-8"))
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\tomma\AppData\Local\Programs\Python\Python36\lib\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)

Closing comment (2020-04-15T06:45:25Z): Marking as a duplicate of #267.