Hi, trying to use the new sessioning in Zope 2.5.0b3 and get this: UnpickleableError Sorry, a site error occurred. Traceback (innermost last): File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 151, in publish_module File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 115, in publish File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line 158, in zpublisher_exception_hook (Object: Live) File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 103, in publish File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line 172, in commit File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Transaction.py, line 233, in commit File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Connection.py, line 345, in commit (Info: (('Products.CMFCore.FSPythonScript', 'FSPythonScript'), '\x00\x00\x00\x00\x00\x00\x00!', '')) UnpickleableError: Cannot pickle <type 'code'> objects Has anyone else experienced this? More importantly, can anyone help with how we should find out what is actually going on here? cheers, Chris
How does this relate to sessioning? ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: <zope-dev@zope.org> Sent: Wednesday, January 09, 2002 6:09 AM Subject: [Zope-dev] Zope 2.5.0b3 a UnpickleableError
Hi,
trying to use the new sessioning in Zope 2.5.0b3 and get this:
UnpickleableError Sorry, a site error occurred.
Traceback (innermost last): File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 151, in publish_module File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 115, in publish File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line 158, in zpublisher_exception_hook (Object: Live) File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 103, in publish File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line 172, in commit File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Transaction.py, line 233, in commit File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Connection.py, line 345, in commit (Info: (('Products.CMFCore.FSPythonScript', 'FSPythonScript'), '\x00\x00\x00\x00\x00\x00\x00!', '')) UnpickleableError: Cannot pickle <type 'code'> objects
Has anyone else experienced this?
More importantly, can anyone help with how we should find out what is actually going on here?
cheers,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Chris McDonough wrote:
How does this relate to sessioning?
Well, I was trying to store a DirectoryView object in the session so I could get to it easily from a multiple-frame page. Of course, this means the DriectoryView gets committed to a storage. 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 :-( Any ideas? cheers, Chris
trying to use the new sessioning in Zope 2.5.0b3 and get this:
UnpickleableError Sorry, a site error occurred.
Traceback (innermost last): File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 151, in publish_module File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 115, in publish File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line 158, in zpublisher_exception_hook (Object: Live) File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py, line 103, in publish File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line 172, in commit File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Transaction.py, line 233, in commit File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Connection.py, line 345, in commit (Info: (('Products.CMFCore.FSPythonScript', 'FSPythonScript'), '\x00\x00\x00\x00\x00\x00\x00!', '')) UnpickleableError: Cannot pickle <type 'code'> objects
Has anyone else experienced this?
More importantly, can anyone help with how we should find out what is actually going on here?
cheers,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
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
Chris McDonough wrote:
I think the answer here might be "don't do that" ;-).
Yeah, that's what we thought ;-) Shame though, since storing objects in the session so different frames can get hold of them without lots of computation seemed like a realyl ncie idea :-S
the "main" storage in the session. You will, however, be able to store newly created objects in the session.
Not so intuitive... *sigh*
waiting-for-your-one-line-question-that-makes-me-retype-docs, ;-)
When's ZODB4 out? ;-) Nah, what was the one line question you were expecting? cheers, Chris
Chris Withers wrote:
Shame though, since storing objects in the session so different frames can get hold of them without lots of computation seemed like a realyl ncie idea :-S
Maybe you can use a RAM cache manager for this? It doesn't store stuff in ZODB.
the "main" storage in the session. You will, however, be able to store newly created objects in the session.
Not so intuitive... *sigh*
Yup. Once ZODB has X-database references, this problem will disappear, but not before.
waiting-for-your-one-line-question-that-makes-me-retype-docs, ;-)
When's ZODB4 out? ;-)
Nah, what was the one line question you were expecting?
just-me-being-snarky, -- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
participants (2)
-
Chris McDonough -
Chris Withers