[Zope] pickling error

Terry Hancock hancock@anansispaceworks.com
Wed, 03 Jul 2002 14:54:45 -0700


Hi all,

I'm hoping this is the last mystery before I 
release ... :-D 

For good or ill, I used a variation of the MiniPickle
module (see the example on zope.org) to pack python data
structures into a cookie.  (I had to add an extra
hex-encoding part to make legal cookies).

I needed an external python method to do this in the
prototype, and I thought it'd be trivial to just attach
these as regular python methods in the product.

However, when I try to call my "mini_dumps" method,
I get a complaint about not being able to pickle
an object in an "acquisition wrapper."  A little
searching on zope.org suggests this is referring to
the internal mechanism that Zope uses to provide
acquisition services.  

But why wouldn't the external method complain about
it?  And how can I unwrap this object? (I guess this
means getting a direct reference to the object instead
of an indirect one, though I'm still foggy on how
acquisition works -- it seems pretty magical still).

Thanks,
Terry

-- 
------------------------------------------------------
Terry Hancock
hancock@anansispaceworks.com       
Anansi Spaceworks                 
http://www.anansispaceworks.com 
P.O. Box 60583                     
Pasadena, CA 91116-6583
------------------------------------------------------