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.

classification
Title: Codec exception chaining shouldn't cover the initial codec lookup
Type: behavior Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ncoghlan Nosy List: ncoghlan, scoder
Priority: normal Keywords:

Created on 2013-11-15 11:10 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg202937 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-11-15 11:10
The exception chaining from issue 17828 is triggering for the initial codec lookup. This is less than helpful:

====================
Failed example:
    str(result)
Expected:
    Traceback (most recent call last):
      ...
    LookupError: unknown encoding: UCS4
Got:
    LookupError: unknown encoding: UCS4
    <BLANKLINE>
    The above exception was the direct cause of the following exception:
    <BLANKLINE>
    Traceback (most recent call last):
      File ".../py3km/python/lib/python3.4/doctest.py", line 1291, in __run
        compileflags, 1), test.globs)
      File "<doctest xpathxslt.txt[89]>", line 1, in <module>
        str(result)
      File "xslt.pxi", line 727, in lxml.etree._XSLTResultTree.__str__
(src/lxml/lxml.etree.c:143584)
      File "xslt.pxi", line 750, in lxml.etree._XSLTResultTree.__unicode__
(src/lxml/lxml.etree.c:143853)
    LookupError: decoding with 'UCS4' codec failed (LookupError: unknown
encoding: UCS4)
====================
msg202940 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-11-15 11:50
Fixed by narrowing the scope of the chaining in http://hg.python.org/cpython/rev/4ea622c085ca
msg202946 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2013-11-15 12:36
Thanks!
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63808
2013-11-15 12:36:39scodersetnosy: + scoder
messages: + msg202946
2013-11-15 11:50:14ncoghlansetstatus: open -> closed
type: behavior
messages: + msg202940

resolution: fixed
stage: resolved
2013-11-15 11:10:29ncoghlancreate