[Zope] Own export: UnpickleableError

Dieter Maurer dieter@handshake.de
Mon, 7 Jul 2003 19:59:22 +0200


Thomas G=FCttler wrote at 2003-7-7 17:40 +0200:
 > I want to pickle parts of my ZODB database and import it on a differen=
t=20
 > system.=20
 >=20
 > Is it possible to use the pickle module?
 >=20
 > The first try results in:
 >   Error Type: UnpickleableError
 >   Error Value: Cannot pickle <extension class    =20
 >      Acquisition.ImplicitAcquirerWrapper at 40225280> objects
 >=20
 > How can I ignore some parts in pickle.dump()?

You unwrap the object (".aq_base") before dumping.


But: you really should use the "export" API.
Using "pickle.dump" has a *high* probability to produce garbage
(as it does not handle persistent subobjects as they should be handled).


Dieter