[mod_python] Session problems with 3.3.1

elias.collas at gulfstream.com elias.collas at gulfstream.com
Tue Nov 6 16:57:06 EST 2007


Graham,

I've read your article
http://www.dscpl.com.au/wiki/ModPython/Articles/IssuesWithSessionObjects
and when I implemented Sessions in my app with mp 3.2.10, I was careful to
avoid saving anything other than dictionaries in the session object.
Everything worked great in until I upgraded to 3.3.1. I'm using the legacy
importer (yes, I punted) and don't use apache.import_module() anywhere.
Here's the lovely traceback:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File
"/cluster/stress/methods/opt/lib/python2.5/site-packages/mod_python/apache.py",
 line 395, in HandlerDispatch
    result = object(req)

  File
"/cluster/stress/methods/opt/lib/python2.5/site-packages/mod_python/publisher.py",
 line 213, in handler
    published = publish_object(req, object)

  File
"/cluster/stress/methods/opt/lib/python2.5/site-packages/mod_python/publisher.py",
 line 425, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form,
req=req))

  File
"/cluster/stress/methods/opt/lib/python2.5/site-packages/mod_python/util.py",
 line 554, in apply_fs_data
    return object(**args)

  File "/cluster/stress/u308168/public_html/gflat/minersrule/index.py",
line 56, in report
    sess.save()

  File
"/cluster/stress/methods/opt/lib/python2.5/site-packages/mod_python/Session.py",
 line 269, in save
    self.do_save(dict)

  File
"/cluster/stress/methods/opt/lib/python2.5/site-packages/mod_python/Session.py",
 line 407, in do_save
    dbm[self._sid] = cPickle.dumps(dict)

  File "/cluster/stress/methods/opt/lib/python2.5/copy_reg.py", line 69, in
_reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__

TypeError: can't pickle StringO objects

Can you shed any light? Thanks for your time.



This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain legally privileged and confidential
information.  If you are not an intended recipient, you are hereby notified
that you have either received this message in error or through
interception, and that any review, use, distribution, copying or disclosure
of this message or its attachments is strictly prohibited and is subject to
criminal and civil penalties.  All personal messages express solely the
sender's views and not those of Gulfstream Aerospace Corporation.  If you
received this message in error, please contact the sender by reply e-mail
and destroy all copies of the original message.




More information about the Mod_python mailing list