Re: [Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-17 Thread Chris McDonough

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 McDonoughZope Corporation
http://www.zope.org http://www.zope.com
Killing hundreds of birds with thousands of stones


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )



[Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris Withers

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  -  [EMAIL PROTECTED]
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 )



Re: [Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris McDonough

How does this relate to sessioning?

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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  -  [EMAIL PROTECTED]
 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 )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )



Re: [Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris Withers

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  -  [EMAIL PROTECTED]
  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 )
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )



Re: [Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris McDonough

 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




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )