New submission from Vasiliy Faronov: >>> from xml.etree import ElementTree as ET >>> ET.fromstring(b'<\xC4/>') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1314, in XML parser.feed(text) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byt e
The documentation for xml.etree.ElementTree does not mention that it can raise UnicodeError, only ParseError. I think that either the above error should be wrapped in a ParseError, or the documentation should be amended. This happens at least on 3.6, 3.5 and 2.7. ---------- messages: 290091 nosy: vfaronov priority: normal severity: normal status: open title: ElementTree.fromstring raises undocumented UnicodeError type: behavior versions: Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29896> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com