#26 Epydoc fails to handle Pmw modules

devel (cvs)
closed-fixed
nobody
inspection (59)
5
2003-09-07
2003-08-26
Anonymous
No

Email: michael_sweeney@agilent.com

I get the following error when trying to generate
documentation on my modules which import the Pmw
module.

It looks like a Pmw loader issue. Is there any way to tell
Epydoc to skip traversing down the Pmw module.

Error:

Internal error: __name__
Unhandled exception in thread started by <function
document at 0x009A8EB0>
Traceback (most recent call last):
File "C:\Python23\Lib\site-packages\epydoc\gui.py",
line 236, in document
d.add(module)
File "C:\Python23\Lib\site-
packages\epydoc\objdoc.py", line 2837, in add
self._add(objID)
File "C:\Python23\Lib\site-
packages\epydoc\objdoc.py", line 2850, in _add
self._add(link.target())
File "C:\Python23\Lib\site-
packages\epydoc\objdoc.py", line 2843, in _add
self.add_one(objID)
File "C:\Python23\Lib\site-
packages\epydoc\objdoc.py", line 2786, in add_one
self.data[objID] = ClassDoc(objID, self._verbosity)
File "C:\Python23\Lib\site-
packages\epydoc\objdoc.py", line 1571, in __init__
vuid = make_uid(val, container, linkname)
File "C:\Python23\Lib\site-packages\epydoc\uid.py",
line 726, in make_uid
uid = ObjectUID(object)
File "C:\Python23\Lib\site-packages\epydoc\uid.py",
line 399, in __init__
name = self._findname()
File "C:\Python23\Lib\site-packages\epydoc\uid.py",
line 475, in _findname
module = self.module()
File "C:\Python23\Lib\site-packages\epydoc\uid.py",
line 516, in module
module = _find_builtin_obj_module(obj)
File "C:\Python23\Lib\site-packages\epydoc\uid.py",
line 891, in _find_builtin_obj_module
if module.__name__ == '__main__': continue
File "C:\Python23\lib\Pmw\Pmw_1_2
\lib\PmwLoader.py", line 174, in __getattr__
raise AttributeError, name
AttributeError: __name__

Discussion

  • Logged In: NO

    Added check for __name__ within module:

    File: uid.py
    Line: 890
    Added: if not hasattr(module, '__name__'): continue

    This seemed to work around the error within Pmw.

     
  • Logged In: NO

    Added check for __name__ within module:

    File: uid.py
    Line: 890
    Added: if not hasattr(module, '__name__'): continue

    This seemed to work around the error within Pmw.

     
  • Edward Loper
    Edward Loper
    2003-09-07

    • labels: --> inspection
    • status: open --> closed-fixed
     
  • Edward Loper
    Edward Loper
    2003-09-07

    • milestone: --> devel (cvs)
     
  • Edward Loper
    Edward Loper
    2003-09-07

    Logged In: YES
    user_id=195958

    I added the proposed fix to the cvs version.