Message290091
>>> 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. |
|
Date |
User |
Action |
Args |
2017-03-24 14:34:38 | vfaronov | set | recipients:
+ vfaronov |
2017-03-24 14:34:38 | vfaronov | set | messageid: <1490366078.02.0.633799101454.issue29896@psf.upfronthosting.co.za> |
2017-03-24 14:34:37 | vfaronov | link | issue29896 messages |
2017-03-24 14:34:37 | vfaronov | create | |
|