[mod_python] PicklingError: Can't pickle <type 'mp_request'>

Brian Zambrano brianz at gmail.com
Mon Aug 4 04:05:09 EDT 2008

Hi there,

I'm getting an odd pickling error from mod_python, apparently.  I'm a django
site with Apache 2.2.8 and mod_python 3.3.1 on Fedora 9.

Any assistance or clues into this would be greatly appreciated.....I'm a
mod_python newb and some quick searches were unfruitful.  I assume
mp_request is a mod_python request object and there is something in there
that pickle doesn't like?


Phase:          'PythonHandler'
Handler:        'django.core.handlers.modpython'

Traceback (most recent call last):

 File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
   default=default_handler, arg=req, silent=hlist.silent)
 File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line
1229, in _process_target
   result = _execute_target(config, req, object, arg)
 File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line
1128, in _execute_target
   result = object(arg)
 File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py",
line 211, in handler
   return ModPythonHandler()(req)
 File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py",
line 188, in __call__
   response = middleware_method(request, response)
line 33, in process_response
line 42, in save
   session_data = self.encode(self._session),
line 75, in encode
   pickled = pickle.dumps(session_dict, pickle.HIGHEST_PROTOCOL)

PicklingError: Can't pickle <type 'mp_request'>: attribute lookup
__builtin__.mp_request failed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080804/b5da1a23/attachment.html

More information about the Mod_python mailing list