Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Broken Help #10

Closed
sanchopanca opened this Issue · 2 comments

3 participants

@sanchopanca

Я установил вашу билиотеку через easy_install.
Вот что случается при попытке получить help:

$ python
Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyte
>>> help(pyte)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site.py", line 469, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib/python2.7/pydoc.py", line 1747, in __call__
    self.help(request)
  File "/usr/lib/python2.7/pydoc.py", line 1794, in help
    else: doc(request, 'Help on %s:')
  File "/usr/lib/python2.7/pydoc.py", line 1531, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/lib/python2.7/pydoc.py", line 1526, in render_doc
    return title % desc + '\n\n' + text.document(object, name)
  File "/usr/lib/python2.7/pydoc.py", line 329, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "/usr/lib/python2.7/pydoc.py", line 1104, in docmodule
    result = result + self.section('CLASSES', join(contents, '\n'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 623: ordinal not in range(128)

Это баг или просто хелпа нет?

@superbobry superbobry was assigned
@superbobry
Collaborator

Есть подозрение, что виноват pydoc и unicode_literals, но точно прямо сейчас сказать сложно. We'll look into it ;)

@knsd
Collaborator

Проблема в не-ascii французских кавычках в докстринге __init__.py, которые не может записать пейджер пайдока. Быстрое решение:

>>> import sys
>>> reload(sys)
<module 'sys' (built-in)>
>>> sys.setdefaultencoding("utf-8")
>>> import pyte
>>> help(pyte)
@knsd knsd closed this in ba956f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.