Questo è l'errore che ho ricevuto oggi su http://filmaster.com "> filmaster.com:PicklingError: Impossibile mettere sottochiave <class 'decimal.Decimal'>: non è lo stesso oggetto decimale. Decimale
PicklingError: Can't pickle : it's not the same object as decimal.Decimal
Cosa che esattamente significa che non sembra essere fare un sacco di senso ... sembra di essere collegato con Django caching Si può vedere l'intera traceback qui:?.
Traceback (most recent call last):
File "/home/filmaster/django-trunk/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs)
File "/home/filmaster/film20/film20/core/film_views.py", line 193, in show_film
workflow.set_data_for_authenticated_user()File "/home/filmaster/film20/film20/core/film_views.py", line 518, in set_data_for_authenticated_user
object_id = self.the_film.parent.id)File "/home/filmaster/film20/film20/core/film_helper.py", line 179, in get_others_ratings
set_cache(CACHE_OTHERS_RATINGS, str(object_id) + "_" + str(user_id), userratings)File "/home/filmaster/film20/film20/utils/cache_helper.py", line 80, in set_cache return cache.set(CACHE_MIDDLEWARE_KEY_PREFIX + full_path, result, get_time(cache_string))
File "/home/filmaster/django-trunk/django/core/cache/backends/memcached.py", line 37, in set
self._cache.set(smart_str(key), value, timeout or self.default_timeout)File "/usr/lib/python2.5/site-packages/cmemcache.py", line 128, in set val, flags = self._convert(val)
File "/usr/lib/python2.5/site-packages/cmemcache.py", line 112, in _convert val = pickle.dumps(val, 2)
PicklingError: Can't pickle : it's not the same object as decimal.Decimal
E il codice sorgente per Filmaster può essere scaricato da qui: bitbucket.org/filmaster/filmaster-test
Qualsiasi aiuto sarà molto apprezzato.
Ho ottenuto un errore simile dopo aver scritto un metodo __getstate__ errato per un oggetto per modificare il suo comportamento sottaceto. Non sei sicuro di quale sia il problema ma controlla uno di questi. – partofthething
L'ho visto anche con i decoratori di classe, in particolare il six.add_metaclass – dbn