This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erickt
Recipients erickt
Date 2008-08-28.17:43:17
SpamBayes Score 0.00014035242
Marked as misclassified No
Message-id <1219945459.86.0.239279043076.issue3715@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

I noticed that doing "pydoc3.0 hashlib" was throwing this exception:

Traceback (most recent call last):
  File "/opt/local/bin/pydoc3.0", line 5, in <module>
    pydoc.cli()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pydoc.py", line 2237, in cli
    help.help(arg)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pydoc.py", line 1714, in help
    elif request: doc(request, 'Help on %s:')
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pydoc.py", line 1504, in doc
    pager(render_doc(thing, title, forceload))
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pydoc.py", line 1319, in pager
    pager(text)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pydoc.py", line 1339, in <lambda>
    return lambda text: pipepager(text, 'less')
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pydoc.py", line 1360, in pipepager
    pipe.write(text)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/io.py", line 1486, in write
    b = encoder.encode(s)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/encodings/mac_roman.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]


This problem is coming from this block of text:

    >>> import hashlib
    >>> m = hashlib.md5()
    >>> m.update(b"Nobody inspects")
    >>> m.update(b" the spammish repetition")
    >>> m.digest()
    b'\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9'

Specifically, the last line. It seems that pydoc is interpreting the 
last line as a unicode string, and then when it tries to print it out on 
my mac it errors out.
History
Date User Action Args
2008-08-28 17:44:20ericktsetrecipients: + erickt
2008-08-28 17:44:19ericktsetmessageid: <1219945459.86.0.239279043076.issue3715@psf.upfronthosting.co.za>
2008-08-28 17:43:19ericktlinkissue3715 messages
2008-08-28 17:43:17ericktcreate