[New-bugs-announce] [issue21398] pydoc heapq leaves terminal in an unusable state

Stefan Krah report at bugs.python.org
Wed Apr 30 13:33:21 CEST 2014


New submission from Stefan Krah:

$ ./python -m pydoc heapq

Traceback (most recent call last):
  File "/home/stefan/hg/cpython/Lib/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/stefan/hg/cpython/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 2615, in <module>
    cli()
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 2580, in cli
    help.help(arg)
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 1862, in help
    elif request: doc(request, 'Help on %s:', output=self._output)
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 1600, in doc
    pager(render_doc(thing, title, forceload))
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 1408, in pager
    pager(text)
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 1422, in <lambda>
    return lambda text: pipepager(text, os.environ['PAGER'])
  File "/home/stefan/hg/cpython/Lib/pydoc.py", line 1449, in pipepager
    pipe.write(text)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe7' in position 3574: ordinal not in range(128)

$ stty sane
$ locale      
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

----------
messages: 217604
nosy: skrah
priority: normal
severity: normal
status: open
title: pydoc heapq leaves terminal in an unusable state
versions: Python 3.5

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


More information about the New-bugs-announce mailing list