This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vfaronov
Recipients vfaronov
Date 2017-03-24.14:34:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490366078.02.0.633799101454.issue29896@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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.
History
Date User Action Args
2017-03-24 14:34:38vfaronovsetrecipients: + vfaronov
2017-03-24 14:34:38vfaronovsetmessageid: <1490366078.02.0.633799101454.issue29896@psf.upfronthosting.co.za>
2017-03-24 14:34:37vfaronovlinkissue29896 messages
2017-03-24 14:34:37vfaronovcreate