You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/opt/venv3/lib/python3.7/site-packages/pyexifinfo/pyexifinfo.py", line 143, in get_csv
s = s.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb9 in position 1313: invalid start byte
The text was updated successfully, but these errors were encountered:
ghost
changed the title
get_csv function
get_csv function invalid start byte
Feb 23, 2020
i use the get_csv function ,in python3.7, but some time will devodeError,
error code on :
https://github.com/guinslym/pyexifinfo/blob/master/pyexifinfo/pyexifinfo.py#L141
I local fix it use this function ,replace s = s.decode('utf-8'), can fix it ,please update
def byte_to_str(byte_str):
if isinstance(byte_str, str):
return byte_str
chard = chardet.detect(byte_str)
if chard.get('encoding'):
byte_str = byte_str.decode(chard['encoding'], 'ignore')
else:
byte_str = byte_str.decode('utf8', 'ignore')
return byte_str
error info:
File "/opt/venv3/lib/python3.7/site-packages/pyexifinfo/pyexifinfo.py", line 143, in get_csv
s = s.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb9 in position 1313: invalid start byte
The text was updated successfully, but these errors were encountered: