[Zope3-dev] AttributeError: 'NoneType' object has no attribute '_implied'

Alec Munro alecmunro at gmail.com
Tue Aug 30 15:00:05 EDT 2005


This seems to be a regression, as I believe this was working with the beta.
I don't have it pinned down entirely, but it seems to be related to an
Annotation adapter I am using. The error occurs in
zope.interface.interface, at the following location:


    def providedBy(self, ob):

        .....

        spec = providedBy(ob)
        return self in spec._implied

Printing spec gives:
<implementedBy zope.app.pagetemplate.simpleviewclass.SimpleViewClass
from /usr/local/Zope-3.1.0c2/lib/python/zope/app/exception/browser/systemerror.pt>

Also, dir(spec) includes '_implied', so I really don't know what's going on.

It isn't likely to be important, but I have commented out the import
of the C optimized version of this method, so I could attempt to debug
it. The error changed when I did this (it was AttributeError:
'NoneType' object has no attribute isOrExtends), but I assume that was
simply because the C code was cloaking the error.

I've attempted to track this down myself, but I really had no luck. I
think I'll do some trial and error editing of my Annotations adapter,
and see if that effects it.

Thanks,

Alec Munro


More information about the Zope3-dev mailing list