[Zope-dev] Zope 2.5.0b3 a UnpickleableError

Chris McDonough chrism@zope.com
Wed, 09 Jan 2002 09:50:51 -0500


> Now DirectoryViews have FSPythonScripts as attributes, so I'm guessing that when
> the DirectoryView gets committed to the TemporaryStorage, the FSPythonScripts do
> as well.
> 
> ...and apparently they don't like being pickled :-(


Ah I see.  What's probably happening here is that FSPythonScripts have 
a file object as an attribute.  File objects can't be pickled because 
files and Python pickles are two different kinds of persistence systems, 
and the file might go away without the pickle knowing about it.

I think the answer here might be "don't do that" ;-).  Note also that 
the next issue you're going to run in to is that because you can't 
distribute object references across ZODB databases, and because the 
sessioning machinery is based on a mounted ZODB storage, that you're not 
going to be able to store many (any?) objects that are already part of 
the "main" storage in the session.  You will, however, be able to store 
newly created objects in the session.

waiting-for-your-one-line-question-that-makes-me-retype-docs, ;-)

- C