Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

Weird Error

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


chrisw at nipltd

Mar 8, 2002, 4:41 AM

Post #1 of 7 (199 views)
Permalink
Weird Error

Anyone know what this means:

> 2002-03-08T11:35:50 ERROR(200) CMFCore.MembershipTool Error during wrapUser:
>
> Type:exceptions.AttributeError
> Value:'None' object has no attribute '__of__'

cheers,

Chris


seb at jamkit

Mar 8, 2002, 5:24 AM

Post #2 of 7 (191 views)
Permalink
Re: Weird Error [In reply to]

> Anyone know what this means:
>
> > 2002-03-08T11:35:50 ERROR(200) CMFCore.MembershipTool Error during wrapUser:
> >
> > Type:exceptions.AttributeError
> > Value:'None' object has no attribute '__of__'

So the wrapUser method is being passed None instead of a user object,
which should never happen as far as I can see. How's it being called?
Can you get a call stack?

seb


chrisw at nipltd

Mar 8, 2002, 5:38 AM

Post #3 of 7 (191 views)
Permalink
Re: Weird Error [In reply to]

seb bacon wrote:
>
> > Anyone know what this means:
> >
> > > 2002-03-08T11:35:50 ERROR(200) CMFCore.MembershipTool Error during wrapUser:
> > >
> > > Type:exceptions.AttributeError
> > > Value:'None' object has no attribute '__of__'
>
> So the wrapUser method is being passed None instead of a user object,
> which should never happen as far as I can see. How's it being called?
> Can you get a call stack?

Only happened once.

Dunno if I can reproduce it.

I suspect it has something to with the fact I was logged in us a user from an acl_users
above the Portal, and, checking, that user isn't in the portal's acl_users.

Do I smell a bug?

cheers,

Chris


magnus.heino at pleon

Mar 8, 2002, 6:12 AM

Post #4 of 7 (191 views)
Permalink
SV: Weird Error [In reply to]

> > > > Type:exceptions.AttributeError
> > > > Value:'None' object has no attribute '__of__'
> >
> > So the wrapUser method is being passed None instead of a user object,
> > which should never happen as far as I can see. How's it being called?
> > Can you get a call stack?
>
> Only happened once.
>
> Dunno if I can reproduce it.
>
> I suspect it has something to with the fact I was logged in us a
> user from an acl_users
> above the Portal, and, checking, that user isn't in the portal's
> acl_users.
>
> Do I smell a bug?

You get this if you have activated the "Control creation of member areas"
feature of portal_membership, and login as a user without a member area,
that is, a user defined in an acl_users above the portal.

It has been there for as long as I can remember, so I thought it should be
that way? :)

/Magnus


dieter at handshake

Mar 8, 2002, 1:47 PM

Post #5 of 7 (191 views)
Permalink
Re: SV: Weird Error [In reply to]

Magnus Heino writes:
> > > > > Type:exceptions.AttributeError
> > > > > Value:'None' object has no attribute '__of__'
> > >
> > > So the wrapUser method is being passed None instead of a user object,
> > > which should never happen as far as I can see. How's it being called?
> > > Can you get a call stack?
> ...
> You get this if you have activated the "Control creation of member areas"
> feature of portal_membership, and login as a user without a member area,
> that is, a user defined in an acl_users above the portal.
Strange, I do not get this error in the described situation...


Dieter


l at lrowe

Apr 17, 2008, 7:47 AM

Post #6 of 7 (188 views)
Permalink
Re: Weird error [In reply to]

.implementedBy is for classes (is this interface implemented by
instances of a class), .providedBy is for instances (is this interface
provided by this object).

The only way I can think that you may trigger this error during
unpickling is if you have somehow managed to get an __implemented__
attribute on the object itself. Not sure how you would manage that.

Probably the best bet is to truncate your filestorage to a transaction
before the change was persisted. Otherwise, you'll need to provide some
more information, i.e. the pickle and the class definition. PDBDebugMode
may be of help.

Laurence


Charlie Clark wrote:
> Hi,
>
> whilst trying out some Zope 3 stuff (implementedBy, providedBy) I
> managed to screw up some portal objects but I'm not quite sure how and
> I've no idea how to fix them.
>
> I effectively did something like:
>
> for obj in folder.contentValues:
> if IMyInterface.implementedBy(obj):
> do_something_with_object()
>
> If I understand things correctly this should not affect the objects
> themselves at all but it does and leads to the following error when I
> subsequently try and access them.
>
> Traceback (most recent call last):
> File "/opt/Zope-2.10/lib/python/ZODB/Connection.py", line 761, in
> setstate
> self._setstate(obj)
> File "/opt/Zope-2.10/lib/python/ZODB/Connection.py", line 819, in
> _setstate
> self._reader.setGhostState(obj, p)
> File "/opt/Zope-2.10/lib/python/ZODB/serialize.py", line 604, in
> setGhostState
> state = self.getState(pickle)
> File "/opt/Zope-2.10/lib/python/ZODB/serialize.py", line 597, in getState
> return unpickler.load()
> File "/opt/Zope-2.10/lib/python/zope/interface/declarations.py", line
> 352, in implementedByFallback
> raise TypeError("ImplementedBy called for non-factory", cls)
> TypeError: (<exceptions.TypeError instance at 0x348cc88>, <built-in
> function implementedBy>, (<Container at >,))
>
> Any idea how I can fix this?
>
> It turns out that I need to use .providedBy() rather than
> .implementedBy() although I'm not too clear of the distinction.
>
> Charlie
> --
> Charlie Clark
> Helmholtzstr. 20
> Düsseldorf
> D- 40215
> Tel: +49-211-938-5360
> GSM: +49-178-782-6226
>
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF[at]lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>

_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


charlie at begeistert

Apr 17, 2008, 8:25 AM

Post #7 of 7 (192 views)
Permalink
Re: Re: Weird error [In reply to]

Am 17.04.2008 um 16:47 schrieb Laurence Rowe:

> .implementedBy is for classes (is this interface implemented by
> instances of a class), .providedBy is for instances (is this
> interface provided by this object).

Thanks for the clarification. Brain is a bit slow this week.

> The only way I can think that you may trigger this error during
> unpickling is if you have somehow managed to get an __implemented__
> attribute on the object itself. Not sure how you would manage that.

Me neither!

> Probably the best bet is to truncate your filestorage to a
> transaction before the change was persisted. Otherwise, you'll need
> to provide some more information, i.e. the pickle and the class
> definition. PDBDebugMode may be of help.


Only test data, fortunately.

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226



_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.