[issue6625] UnicodeEncodeError on pydoc's CLI

Christoph Burgmer report at bugs.python.org
Wed Aug 5 13:29:50 CEST 2009


Christoph Burgmer <cburgmer at ira.uka.de> added the comment:

Here is a diff for test/test_pydoc.py (against Python2.6) which though
doesn't trigger due to how Python handles output encoding. This test
here will pass, but pydoc will still fail:

$ pydoc test/pydoc_mod.py > /dev/null
Traceback (most recent call last):
  File "/usr/bin/pydoc", line 5, in <module>
    pydoc.cli()
  File "/usr/lib/python2.5/pydoc.py", line 2226, in cli
    help.help(arg)
  File "/usr/lib/python2.5/pydoc.py", line 1691, in help
    else: doc(request, 'Help on %s:')
  File "/usr/lib/python2.5/pydoc.py", line 1482, in doc
    pager(title % desc + '\n\n' + text.document(object, name))
  File "/usr/lib/python2.5/pydoc.py", line 1300, in pager
    pager(text)
  File "/usr/lib/python2.5/pydoc.py", line 1398, in plainpager
    sys.stdout.write(plain(text))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 936: ordinal not in range(128)

----------
Added file: http://bugs.python.org/file14656/pydoc_unicode_testcase_notworking.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6625>
_______________________________________


More information about the Python-bugs-list mailing list