RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1292126 - Traceback when trying to view documentation
Summary: Traceback when trying to view documentation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-pyudev
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-16 14:35 UTC by Branislav Náter
Modified: 2015-12-17 00:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-16 15:22:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Branislav Náter 2015-12-16 14:35:28 UTC
Description of problem:
Traceback when trying to view documentation using pydoc.

Version-Release number of selected component (if applicable):
python-pyudev-0.15-7.el7

How reproducible:
always

Steps to Reproduce:
1. pydoc pyudev

Actual results:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site.py", line 459, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib64/python2.7/pydoc.py", line 1745, in __call__
    self.help(request)
  File "/usr/lib64/python2.7/pydoc.py", line 1792, in help
    else: doc(request, 'Help on %s:')
  File "/usr/lib64/python2.7/pydoc.py", line 1529, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/lib64/python2.7/pydoc.py", line 1334, in pager
    pager(text)
  File "/usr/lib64/python2.7/pydoc.py", line 1354, in <lambda>
    return lambda text: pipepager(text, 'less')
  File "/usr/lib64/python2.7/pydoc.py", line 1375, in pipepager
    pipe.write(text)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 9159: ordinal not in range(128)

Expected results:
Documentation displayed

Comment 2 mulhern 2015-12-16 15:22:28 UTC
This is essentially a pydoc error, see: https://bugs.python.org/issue1065986.

It was fixed in some version of python between 2.7.5, where the problem still appears, and 2.7.10, where it does not seem to be present. It is also fixed in python v 3.0.

Comment 3 mulhern 2015-12-16 15:58:24 UTC
Note: You might be wondering why pyudev is triggering this bug, when many other packages do not. The reason is that the developer of pyudev chose to import unicode_literals from __future__ in every file. This means that all literal strings are automatically unicode, including docstrings.

And, btw, I have found the offending ASCII '-'s, and changed them to ','s (https://github.com/mulkieran/pyudev/commit/46ae2eb0d966aea40ddd0e66f3fdf71e3b12b34a). This means that pyudev should no longer trigger this bug in the next version (0.19).


Note You need to log in before you can comment on or make changes to this bug.