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 

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to