[New-bugs-announce] [issue15791] pydoc does not handle unicode AUTHOR field
Michele Orrù
report at bugs.python.org
Mon Aug 27 14:28:43 CEST 2012
New submission from Michele Orrù:
$ echo "__author__ = u'Michele Orr\xf9'" > foo.py && python -c "import foo; print foo.__author__; help(foo)"
Michele Orrù
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 467, in __call__
return pydoc.help(*args, **kwds)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 1747, in __call__
self.help(request)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 1794, in help
else: doc(request, 'Help on %s:')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 1531, in doc
pager(render_doc(thing, title, forceload))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 1526, in render_doc
return title % desc + '\n\n' + text.document(object, name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 329, in document
if inspect.ismodule(object): return self.docmodule(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 1126, in docmodule
result = result + self.section('AUTHOR', str(object.__author__))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf9' in position 11: ordinal not in range(128)
----------
components: Unicode
messages: 169196
nosy: eric.araujo, ezio.melotti, maker
priority: normal
severity: normal
status: open
title: pydoc does not handle unicode AUTHOR field
type: crash
versions: Python 2.6, Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15791>
_______________________________________
More information about the New-bugs-announce
mailing list