UnicodeEncodeError on help(polar)

Bug #685710 reported by Goyo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
matplotlib
Unknown
Unknown
matplotlib (Ubuntu)
Fix Released
Medium
Artur Rona

Bug Description

Ubuntu 10.10
python-matplotlib (0.99.3-1ubuntu1)

UnicodeEncodeError is raised when help on matplotlib.projections.polar is requested.

$python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.projections.polar as polar
>>> help(polar)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site.py", line 432, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib/python2.6/pydoc.py", line 1730, in __call__
    self.help(request)
  File "/usr/lib/python2.6/pydoc.py", line 1777, in help
    else: doc(request, 'Help on %s:')
  File "/usr/lib/python2.6/pydoc.py", line 1515, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/lib/python2.6/pydoc.py", line 1510, in render_doc
    return title % desc + '\n\n' + text.document(object, name)
  File "/usr/lib/python2.6/pydoc.py", line 330, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "/usr/lib/python2.6/pydoc.py", line 1095, in docmodule
    contents.append(self.document(value, key, name))
  File "/usr/lib/python2.6/pydoc.py", line 331, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "/usr/lib/python2.6/pydoc.py", line 1227, in docclass
    lambda t: t[1] == 'data')
  File "/usr/lib/python2.6/pydoc.py", line 1193, in spilldata
    name, mod, maxlen=70, doc=doc) + '\n')
  File "/usr/lib/python2.6/pydoc.py", line 1313, in docother
    line += '\n' + self.indent(str(doc))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 116: ordinal not in range(128)

Tags: patch
Revision history for this message
Jouni K. Seppänen (jks) wrote :

Confirmed on matplotlib svn trunk.

Revision history for this message
Mike Droettboom (mdboom) wrote :

Fixed upstream in SVN r8816 with the attached patch.

Revision history for this message
Mike Droettboom (mdboom) wrote :

Fixed upstream in SVN r8816 with the attached patch.

tags: added: patch
Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

The patch looks fine but I can't even build the source package, as python-dbg crashes for some reason.

Revision history for this message
Artur Rona (ari-tczew) wrote :

I'll take this one. ACKed by Krzysztof Klimonda.

Changed in matplotlib (Ubuntu):
assignee: nobody → Artur Rona (ari-tczew)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Artur Rona (ari-tczew) wrote :

Thank you for your contribution!

Changed in matplotlib (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package matplotlib - 0.99.3-1ubuntu3

---------------
matplotlib (0.99.3-1ubuntu3) natty; urgency=low

  [ Mike Droettboom ]
  * debian/patches/40_UnicodeEncodeError.patch: Remove unicode from docstrings
    since it doesn't play well with __builtin__.help(). (LP: #685710)
 -- Artur Rona <email address hidden> Mon, 04 Apr 2011 21:24:28 +0200

Changed in matplotlib (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.