Red Hat Bugzilla – Bug 1025961
crash with pydoc -k
Last modified: 2014-06-18 00:23:54 EDT
Description of problem:
matej@wycliff: ~$ pydoc -k wraps
Traceback (most recent call last):
File "/usr/bin/pydoc", line 5, in <module>
File "/usr/lib64/python2.7/pydoc.py", line 2292, in cli
File "/usr/lib64/python2.7/pydoc.py", line 1992, in apropos
ModuleScanner().run(callback, key, onerror=onerror)
File "/usr/lib64/python2.7/pydoc.py", line 1973, in run
module = loader.load_module(modname)
AttributeError: 'NoneType' object has no attribute 'load_module'
Version-Release number of selected component (if applicable):
Steps to Reproduce:
- This only happens when PyQt4 is installed.
- On line 1962, loader is instantiated by importer.find_module. For "PyQt4.uic.pyuic", importer.find_module returns None, which then causes the AttributeError.
- File /usr/lib64/python2.7/site-packages/PyQt4/uic/pyuic.py is a symlink to /usr/bin/pyuic4, which lives in PyQt4-devel.
- If PyQt4-devel is not installed, pyuic.py is unimportable, which makes pydoc fail.
IMO this is a problem in packaging of PyQt4, since pyuic.py file should be in PyQt4-devel package, not in the main PyQt4 package where it's unusable. I'll open a bug for PyQt4.
Fixed in PyQt4 => moving to MODIFIED.
Root cause has been solved by bz#1026209.
Now, traceback doesn't occur if PyQt4-devel is not installed:
# rpm -qa | grep PyQt4
# pydoc -k wraps
ldap.functions - functions.py - wraps functions of module _ldap
ldap.ldapobject - ldapobject.py - wraps class _ldap.LDAPObject
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.