Hi there,
I've just encountered a strange problem with my django application,
wondering if anyone has seen it before.

I tried to store an instance of model into session in one of my view
functions and got this error:
+---------------------------------------------------------------------------------------------------------------------
+
Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\django\core\servers
\basehttp.py", line 278
, in run
    self.result = application(self.environ, self.start_response)
  File "C:\Python25\lib\site-packages\django\core\servers
\basehttp.py", line 635
, in __call__
    return self.application(environ, start_response)
  File "C:\Python25\lib\site-packages\django\core\handlers\wsgi.py",
line 243, i
n __call__
    response = middleware_method(request, response)
  File "C:\Python25\lib\site-packages\django\contrib\sessions
\middleware.py", li
ne 35, in process_response
    request.session.save()
  File "C:\Python25\lib\site-packages\django\contrib\sessions\backends
\db.py", l
ine 53, in save
    session_data = self.encode(self._get_session
(no_load=must_create)),
  File "C:\Python25\lib\site-packages\django\contrib\sessions\backends
\base.py",
 line 88, in encode
    pickled = pickle.dumps(session_dict, pickle.HIGHEST_PROTOCOL)
PicklingError: Can't pickle <type 'cStringIO.StringO'>: attribute
lookup cString
IO.StringO failed
+---------------------------------------------------------------------------------------------------------------------
+
StringO seems to be a feature of Python's cStringIO which serves as a
read-only object, and causes some pickling problems according to some
internet posts.

What makes me feel weird is that I can successfully store an object of
a different model into session in another view function.

This error only occurs on my office's machine, which is running Python
2.5.4 and Django 1.0.2. The application runs fine on my home's
computer which seems to be running an earlier version of Python.

Has anyone seen this error before? Or know how to solve it?

Thanks a lot.

Regards,
Frank

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to