Re: cPickle error when caching data

2010-08-03 Thread Benedict Verheyen
On 3/08/2010 17:01, Peter Otten wrote: > You can only pickle instances of classes that are reachable by the import > system as only the qualified name of the class is stored, not the bytecode > to generate it. Move your class out of the function into the global module > scope and you should be

Re: cPickle error when caching data

2010-08-03 Thread Peter Otten
Benedict Verheyen wrote: > i get the following error when trying to set data in the cache of a django > application. The error is however a python error as it involves pickling > and i can reproduce it in a shell. > The error i get is this: > cPickle.PicklingError: Can't pickle : > attribute looku

cPickle error when caching data

2010-08-03 Thread Benedict Verheyen
Hi i get the following error when trying to set data in the cache of a django application. The error is however a python error as it involves pickling and i can reproduce it in a shell. The error i get is this: cPickle.PicklingError: Can't pickle : attribute lookup management.views.Stats failed