Exception in pydoc

R

Ricardo Aráoz

I'm developing an in house app. Many coders here are not fluent in
english, so docstrings must be in Spanish in spite of recommendations
that docstrings better be in English.
When I use accented characters (in this case an 'ó') in my docstrings I
get :Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Python25\lib\site.py", line 346, in __call__
return pydoc.help(*args, **kwds)
File "C:\Python25\lib\pydoc.py", line 1645, in __call__
self.help(request)
File "C:\Python25\lib\pydoc.py", line 1687, in help
elif request: doc(request, 'Help on %s:')
File "C:\Python25\lib\pydoc.py", line 1481, in doc
pager(title % desc + '\n\n' + text.document(object, name))
File "C:\Python25\lib\pydoc.py", line 324, in document
if inspect.ismodule(object): return self.docmodule(*args)
File "C:\Python25\lib\pydoc.py", line 1072, in docmodule
contents.append(self.document(value, key, name))
File "C:\Python25\lib\pydoc.py", line 325, in document
if inspect.isclass(object): return self.docclass(*args)
File "C:\Python25\lib\pydoc.py", line 1208, in docclass
contents = '\n'.join(contents)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
115: ordinal not in range(128)

The file's first two lines are :
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""

Does pydoc only deal with ASCII?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top