[mod_python] UnpickleableError

Gregory Bond gnb at itga.com.au
Tue Jun 8 11:16:33 EDT 2004


stefan.oberbichler at umit.at said:
> class, which makes a connection to  a firebird db. But trying to save
> (req.session.save()) these variables i get an  "UnpickleableError:
> Cannot pickle objects" 

I'm assuming your object cointains a socket connection to the database.  This
is not pickle-able - no open file objects are.  (Which makes sense when you
think about it!)

You need to make sure the connection is not pickled but is re-created when the
object is un-pickled.  See the python module documentation on the pickle
funtions (Section 3.14.5.1 in the library reference in my copy).




More information about the Mod_python mailing list