[ZODB-Dev] UnpickleableError
Adam Groszer
agroszer at gmail.com
Thu Mar 8 05:38:29 EST 2007
Hello,
Just run into a usual "Cannot pickle <type
'zope.security._proxy._Proxy'> objects" exception.
What about doing the following patch, that might help a lot
determining what cannot be pickled?
Index: serialize.py
===================================================================
--- serialize.py (revision 71248)
+++ serialize.py (working copy)
@@ -413,7 +413,13 @@
self._file.seek(0)
self._p.clear_memo()
self._p.dump(classmeta)
- self._p.dump(state)
+ try:
+ self._p.dump(state)
+ except Exception, msg:
+ log = logging.getLogger("ZODB.serialize")
+ log.exception("Pickling error: %s, classmeta: %s", str(msg), str(classmeta))
+ raise
+
self._file.truncate()
return self._file.getvalue()
--
Best regards,
Groszer Adam
--
Quote of the day:
Never close your lips to those to whom you have opened your heart.
- Charles Dickens
More information about the ZODB-Dev
mailing list