Hi folks, My first post on the forum! I've been watching the threads for a while, but now I need your help :)
For a recent project, my users sometimes get the following error: (this error is output raw to the user, as text sent back to the browser as the response content) ****** Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/var/lib/python-support/python2.4/django/core/handlers/ modpython.py", line 177, in handler return ModPythonHandler()(req) File "/var/lib/python-support/python2.4/django/core/handlers/ modpython.py", line 154, in __call__ response = middleware_method(request, response) File "/var/lib/python-support/python2.4/django/contrib/sessions/ middleware.py", line 99, in process_response datetime.datetime.now() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)) File "/var/lib/python-support/python2.4/django/contrib/sessions/ models.py", line 44, in save s = self.model(session_key, self.encode(session_dict), expire_date) File "/var/lib/python-support/python2.4/django/contrib/sessions/ models.py", line 10, in encode pickled = pickle.dumps(session_dict) File "copy_reg.py", line 69, in _reduce_ex raise TypeError, "can't pickle %s objects" % base.__name__ TypeError: can't pickle function objects ****** 'Can't pickle function objects' I can't seem to understand why on earth Django is trying to pickle a 'function' into the user's session. This error often happens when users leave their browser open and try to continue the process later on (a few hours later). I did not change the settings.SESSION_COOKIE_AGE parameter, which means that it is set at the default value (2 weeks from the documentation). So the problem is not about the session's age. Now I'm left thinking that it might be my fault : have I put something wrong in the session ? In this case, the session contains, at most, one or two strings and 1 or 2 unsaved or saved (persisted) model instances. Is it right (or legal) to put an unsaved model instance in a user's session ? Thanks for your help ! -- David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---