bug?

1 view
Skip to first unread message

Gerdus van Zyl

unread,
Jan 2, 2008, 9:50:02 AM1/2/08
to Apydia
The apydia script gives an attribute error on line 321 of
descriptors.py: NoneType object has no attribute '__name__'. It is
because getmodule(class_) return None.
I am using latest from SVN - 0.0.2r37

It works if you replace:
self.module = ModuleDesc.load(getmodule(class_).__name__)
with:
if not getmodule(class_) == None:
self.module = ModuleDesc.load(getmodule(class_).__name__)
else:
class em(object):
pass
self.module = em()
self.module.pathname = ''

I also ran into problems (apydia crashes) on a ctypes wrapper that
complained about a missing DLL file. Is there not some way to trap all
errors and then just ignore the files/class that gave the exception?

I must say Apydia is pretty awesome when it works :-) and pretty too.

~Gerdus

Daniel Haus

unread,
Jan 2, 2008, 10:27:42 AM1/2/08
to apy...@googlegroups.com
Am 02.01.2008 um 15:50 schrieb Gerdus van Zyl:

> The apydia script gives an attribute error on line 321 of
> descriptors.py: NoneType object has no attribute '__name__'. It is
> because getmodule(class_) return None.
> I am using latest from SVN - 0.0.2r37
>
> It works if you replace:
> self.module = ModuleDesc.load(getmodule(class_).__name__)
> with:
> if not getmodule(class_) == None:
> self.module = ModuleDesc.load(getmodule(class_).__name__)
> else:
> class em(object):
> pass
> self.module = em()
> self.module.pathname = ''

Thanks, I'll try that.

> I also ran into problems (apydia crashes) on a ctypes wrapper that
> complained about a missing DLL file. Is there not some way to trap all
> errors and then just ignore the files/class that gave the exception?

I have no idea, I didn't try that case. Is there a quick example you
could give (short explanation how to reproduce this)?

> I must say Apydia is pretty awesome when it works :-) and pretty too.

Thank you, Gerdus. There's a much more to come, especially concerning
the themes.

--
Daniel Haus
http://ematia.de

Gerdus van Zyl

unread,
Jan 2, 2008, 11:48:50 AM1/2/08
to Apydia
> I have no idea, I didn't try that case. Is there a quick example you
> could give (short explanation how to reproduce this)?
from ctypes import *
l=CDLL('librsvg-2-2.dll')
Partly my fault for not wrapping it in a function and try..catch the
exception. My point is that according to me Apydia should ignore
exceptions and not crash out. Then again it is an effective code
testing tool :-)

>There's a much more to come, especially concerning the themes.
That would be great. Especially if it worked and looked like
http://docs.mootools.net

~GvZ
Reply all
Reply to author
Forward
0 new messages