[Zope3-dev] RE: [Zope3-Users] Cannot Pickle

Roger Ineichen dev at projekt01.ch
Tue Mar 8 18:43:55 EST 2005


Hi Marc

> -----Original Message-----
> From: zope3-users-bounces at zope.org 
> [mailto:zope3-users-bounces at zope.org] On Behalf Of Marc Rijken
> Sent: Wednesday, March 09, 2005 12:28 AM
> To: zope3-users at zope.org
> Subject: [Zope3-Users] Cannot Pickle
> 
> Hi,
> 
> I have some content objects (derived from Contained) which 
> are located 
> in a container. I want to asign a object to a attribute of an another 
> object. For example:
> 
> class Y(BTreeContainer):
>     pass
> 
> class X (Contained):
>     data = None

Is data a class variable or self.data ?

Try:
class X(Contained):

  def __init__(self)
    self.data = None

> y = Y()
> x1 = X()
> y['x1'] = x1
> x2 = X()
> y['x2'] = x2
> 
> x1.data = x2
> 
> When that last statement is performed, I get a Cannot Pickle Error. I 
> googled and looked in the code of Zope3. It lookes like 
> removeAllProxies 
> could help me, but it isn't. What do I do wrong?
> 
> Thanx,
> 
> Marc
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 



More information about the Zope3-dev mailing list