[Zope3-Users] Cannot Pickle
Jim Fulton
jim at zope.com
Tue Mar 8 19:50:07 EST 2005
Marc Rijken wrote:
> 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
>
> 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?
I just tried this code, after adding the missing imports, and didn't get
an error, so, obviously, you aren't giving us the whole story. :)
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-users
mailing list