[Grok-dev] Re: Upgrade problem "type object 'IRole' has no attribute '__iro__'"

Sebastian Ware sebastian at urbantalk.se
Fri May 30 02:26:13 EDT 2008


Here comes some more about the object.

AttributeError: type object 'IRole' has no attribute '__iro__'
exceptions.AttributeError:
type object 'IRole' has no attribute '__iro__'
 > /Users/jhsware/groksandbox/eggs/zope.interface-3.4.0-py2.4- 
macosx-10.3-i386.egg/zope/interface/adapter.py(431)add_extendor()
-> for i in provided.__iro__:
(Pdb) provided.__module__
'zope.app.securitypolicy.interfaces'
(Pdb) provided
<class 'zope.app.securitypolicy.interfaces.IRole'>
(Pdb) dir(provided)
['__Broken_initargs__', '__Broken_state__', '__class__',  
'__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash__',  
'__implemented__', '__init__', '__module__', '__name__', '__new__',  
'__providedBy__', '__provides__', '__reduce__', '__reduce_ex__',  
'__repr__', '__setattr__', '__setstate__', '__str__', '__weakref__']
(Pdb)


Mvh Sebastian


29 maj 2008 kl. 15.56 skrev Philipp von Weitershausen:

> On 28 May 2008, at 00:08 , Sebastian Ware wrote:
>> My bad! I am also adding another traceback below relating to trying  
>> to open the root management screen.
>>
>> 2008-05-27T19:01:26 ERROR SiteError Error while reporting an error  
>> to the Error Reporting utility
>> Traceback (most recent call last):
>>  ...
>> AttributeError: type object 'IRole' has no attribute '__iro__'
>
> The fact that it says "type object" means that it now thinks IRole  
> is a (new-style) class rather than an interface. I wonder which  
> IRole it's talking about. Could you find out where it comes from  
> (e.g. inspect IRole.__module__)?
>
>> 2008-05-27T19:07:06 ERROR SiteError http://localhost:8080/ 
>> applications
>> Traceback (most recent call last):
>>  ...
>> AttributeError: 'CookieClientIdManager' object has no attribute  
>> 'cookieLifetime'
>
> CookieClientIdManager's cookieLifeTime attribute is actually a class  
> attribute. So as with IRole, it seems the ZODB isn't finding the  
> right class when unpickling.
>
> What happens when you add zope.app.session and  
> zope.app.securitypolicy as explicit dependencies to your application?
>



More information about the Grok-dev mailing list