#13977: Indeterministic PicklingError
----------------------------------------------+-----------------------------
Reporter: etam | Owner: nobody
Status: new | Milestone:
Component: django.contrib.sessions | Version: 1.2
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------------+-----------------------------
Changes (by etam):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
There is similar problem (thanks to Dan Breslau from stackoverflow.com -
[http://stackoverflow.com/questions/3292383/django-mod-wsgi-picklingerror-
while-saving-object]):
{{{
>>> import cPickle
>>> class Foo(object):
... pass
...
>>> f = Foo()
>>> s = cPickle.dumps(f)
>>>
>>> # Redefine class Foo
>>> class Foo(object):
... pass
...
>>> # Now attempt to pickle the same object that was created with the old
Foo class
>>> s = cPickle.dumps(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cPickle.PicklingError: Can't pickle <class '__main__.Foo'>: it's not the
same object as __main__.Foo
>>>
>>> # Create an object with the new Foo class, and try to pickle it (this
works)
>>> f2 = Foo()
>>> s = cPickle.dumps(f2)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/13977#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.