Subject: epydoc problems with my app
From: Paul McNett
Date: Sat, 12 Mar 2005 08:56:32 -0800

Hi,

I wonder if anyone else uses epydoc to document their wxPython app and 
can comment on a traceback I'm getting:

Traceback (most recent call last):
   File "/usr/lib/site-python/epydoc/cli.py", line 747, in ?
     cli()
   File "/usr/lib/site-python/epydoc/cli.py", line 108, in cli
     docmap = _make_docmap(modules, options)
   File "/usr/lib/site-python/epydoc/cli.py", line 484, in _make_docmap
     try: d.add(module)
   File "/usr/lib/site-python/epydoc/objdoc.py", line 2954, in add
     self._add(objID)
   File "/usr/lib/site-python/epydoc/objdoc.py", line 2968, in _add
     self._add(link.target())
   File "/usr/lib/site-python/epydoc/objdoc.py", line 2961, in _add
     self.add_one(objID)
   File "/usr/lib/site-python/epydoc/objdoc.py", line 2900, in add_one
     self.data[objID] = ClassDoc(objID, self._verbosity)
   File "/usr/lib/site-python/epydoc/objdoc.py", line 1589, in __init__
     self._base_order = [make_uid(b) for b in base_order]
   File "/usr/lib/site-python/epydoc/uid.py", line 781, in make_uid
     uid = ObjectUID(object)
   File "/usr/lib/site-python/epydoc/uid.py", line 418, in __init__
     name = self._findname()
   File "/usr/lib/site-python/epydoc/uid.py", line 509, in _findname
     return '%s.%s' % (self.module(), objname)
   File "/usr/lib/site-python/epydoc/uid.py", line 585, in module
     if (self._module is not None and
   File "/home/pmcnett/wxPythonSrc/wxPython/wx/_misc.py", line 3665, in 
__eq__
     return _misc_.DateTime___eq__(*args)
TypeError: Expected a pointer


If I modify /usr/lib/site-python/epydoc/uid.py with the following diff, 
all seems to work well:

--- uid.py      2005-03-12 08:51:18.070341784 -0800
+++ uid.py.fixed        2005-03-12 08:51:11.862285552 -0800
@@ -582,11 +582,14 @@
                  elif (isinstance(obj, _TypeType) and
                        hasattr(obj, '__module__')):
                      self._module = 
ObjectUID(import_module(obj.__module__))
-                    if (self._module is not None and
-                        obj not in self._module.value().__dict__.values()):
-                        # The __module__ attribute lied; try finding it 
ourselves.
-                        module = _find_builtin_obj_module(obj)
-                        if module is not None: self._module = 
ObjectUID(module)
+                    try:
+                        if (self._module is not None and
+                            obj not in 
self._module.value().__dict__.values()):
+                            # The __module__ attribute lied; try 
finding it ourselves.
+                            module = _find_builtin_obj_module(obj)
+                            if module is not None: self._module = 
ObjectUID(module)
+                    except:
+                        pass
                  elif isinstance(obj, _TypeType):
                      module = _find_builtin_obj_module(obj)
                      if module is None: self._module = None

This is with wxPython 2.5.3.1 unicode gtk2, an epydoc 2.1. Is this 
wxPython's fault, epydoc's fault, or my fault?


-- 
pkm ~ http://paulmcnett.com