Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When loading the dataset, I'm getting a unicodeDecodeError #8

Closed
adityabharadwaj198 opened this issue Jan 20, 2019 · 5 comments
Closed

Comments

@adityabharadwaj198
Copy link

Traceback (most recent call last):
File "roaddamagedataset.py", line 30, in
tree = ElementTree.parse(infile_xml)
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
tree.parse(source, parser)
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
self._root = parser._parse_whole(source)
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 45: invalid start byte

this is what the traceback for the error is. Thank you

@bygreencn
Copy link

@adityabharadwaj198 maybe it caused by the hidden files in all Annotations folders.

@tanajikamble13
Copy link

thnks @adityabharadwaj198

@RedmondMax
Copy link

annotation XML files seems cp1252 encode ? XML parse does not work for me.

�� � Mac OS X � 2 ~ � ° ATTR ° ˜ � � ˜ � �com.apple.quarantine q/0081;5a5bf4e8;Safari;

@RedmondMax
Copy link

/anaconda/envs/py36/lib/python3.6/codecs.py in decode(self, input, final)
319 # decode input (taking the buffer into account)
320 data = self.buffer + input
--> 321 (result, consumed) = self._buffer_decode(data, self.errors, final)
322 # keep undecoded input until the next call
323 self.buffer = data[consumed:]

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 45: invalid start byte

@hiroyamaeda
Copy link
Collaborator

Thanks! @bygreencn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants