UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128)
theiceman opened this issue · 4 comments
Traceback (most recent call last):
File "lastpass2keepass.py", line 143, in
doc.write(w)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 815, in write
serialize(write, self._root, encoding, qnames, namespaces)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 934, in _serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 934, in _serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 934, in _serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 932, in _serialize_xml
write(_escape_cdata(text, encoding))
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1068, in _escape_cdata
return text.encode(encoding, "xmlcharrefreplace")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128)
Looks like an encoding error caused by ElementTree - which is weird.
What system are you on? ( OS, python etc. )
The test generates complex utf-8 strings that pass so that can't be it - Other have had errors like that before.
Don't suppose you can give a sanitized version of the string in question?
I'm using Fedora 15/x64
-- python-2.7.1-7.fc15.x86_64
i think it's the Hebrew charset in the file
url,username,password,extra,name,grouping,fav http://www.zvz.co.il/,goodusername,1234,,zvz.co.il,,0 http://www.zvz.co.il/,כינוי באתר,1234,,zvz.co.il,,0
Fixed in mainline. Grab the latest version.
Sorry for the delay.