AttributeError: 'ModuleDesc' object has no attribute '_members'

3 views
Skip to first unread message

Ken Arnold

unread,
Feb 26, 2009, 7:15:31 PM2/26/09
to Apydia
Hi from the Open Mind Common Sense project! (csc.media.mit.edu) We're
trying to use apydia to generate docs for our Divisi project
(divisi.media.mit.edu). So far it's been promising but hit-and-miss.
We've had it working occasionally, with varying degrees of hacking our
code or yours, but I'm trying to "do it right" and am stuck.

We had one glaring problem: apydia crashes on a cython module. But I
figured out how to exclude that; it's not that important. (Still nice
to have though.)

Then I got an error about Markdown (number of arguments to __str__),
which appeared fixed in the development version, so I checked out and
built the svn. (This failed at first because something seemed to want
BeautifulSoup==3.0.7 iirc; I couldn't find what was asking for it.
easy_install -U BeautifulSoup fixed that.)

Now I'm stuck at a bug I can't understand:

File "/usr/lib/python2.5/site-packages/Apydia-0.0.3dev_r59-py2.5.egg/
apydia/project.py", line 66, in __init__
for module in desc.module_tree():
File "/usr/lib/python2.5/site-packages/Apydia-0.0.3dev_r59-py2.5.egg/
apydia/descriptors.py", line 308, in module_tree
modules.update(module.module_tree(modules))
File "/usr/lib/python2.5/site-packages/Apydia-0.0.3dev_r59-py2.5.egg/
apydia/descriptors.py", line 306, in module_tree
modules = set(self.modules)
File "/usr/lib/python2.5/site-packages/Apydia-0.0.3dev_r59-py2.5.egg/
apydia/descriptors.py", line 185, in <lambda>
modules = property(lambda self:sorted(self.generate_memberlist
(ModuleDesc)))
File "/usr/lib/python2.5/site-packages/Apydia-0.0.3dev_r59-py2.5.egg/
apydia/descriptors.py", line 130, in generate_memberlist
for name, member in self._members.iteritems():
AttributeError: 'ModuleDesc' object has no attribute '_members'

Running in ipython, I can get:
ipdb> p self.__dict__
{'name': 'svd', 'parent': None, 'value': <module 'divisi.svd' from
'divisi/svd.pyc'>, 'project': <apydia.project.Project object at
0xa16f7ec>, 'pathname': 'divisi.svd', 'file': ''}

That file imports the cython module. I tried excluding the module, but
that seems to have no effect. And I can't figure out from the code how
a ModuleDesc could have possibly gotten created without a _members.

The code, should you need to see it, is at
https://code.launchpad.net/~commonsense/divisi/relocation.

I was hoping this email would come with a patch, but unfortunately it
eludes my sleuthing. :)

Thanks,
-Ken
Reply all
Reply to author
Forward
0 new messages