Suor/django-cacheops — Issue #5: PicklingError: Can't pickle User Groups
Author: kevinpostal
Created: 2011-10-26 06:48:27+00:00
State: open

I have a signal removing and adding user groups.

Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/code/filterfoundry/ffprofile/views.py" in register_with_subscription_plan
362. return register(request, *args, **kwargs)
File "/home/code/filterfoundry/registration/views.py" in register
187. new_user = backend.register(request, **form.cleaned_data)
File "/home/code/filterfoundry/registration/backends/simple/__init__.py" in register
33. request=request)
File "/usr/local/lib/python2.6/dist-packages/django/dispatch/dispatcher.py" in send
172. response = receiver(signal=self, sender=sender, **named)
File "/home/code/filterfoundry/ffprofile/signals.py" in new_user
71. object.save()
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py" in save
460. self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py" in save_base
570. created=(not record_exists), raw=raw, using=using)
File "/usr/local/lib/python2.6/dist-packages/django/dispatch/dispatcher.py" in send
172. response = receiver(signal=self, sender=sender, **named)
File "/home/code/filterfoundry/promocodes/signals.py" in new_promocode
9. subscription_change(instance.user,instance.code.subscription)
File "/home/code/filterfoundry/subscription/views.py" in subscription_change
64. user.groups.remove(old_group)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/fields/related.py" in remove
511. self._remove_items(self.source_field_name, self.target_field_name, *objs)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/fields/related.py" in _remove_items
622. '%s__in' % target_field_name: old_ids
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py" in delete
444. collector.collect(del_query)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/deletion.py" in collect
146. reverse_dependency=reverse_dependency)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/deletion.py" in add
91. if not objs:
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py" in __nonzero__
113. iter(self).next()
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py" in _result_iter
107. self._fill_cache()
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py" in _fill_cache
772. self._result_cache.append(self._iter.next())
File "/home/code/filterfoundry/cacheops/query.py" in iterator
328. self._cache_results(cache_key, results)
File "/home/code/filterfoundry/cacheops/query.py" in _cache_results
230. cache_thing(self.model, cache_key, results, cond_dnf, timeout=self._cachetimeout)
File "/home/code/filterfoundry/cacheops/query.py" in cache_thing
40. pickled_data = pickle.dumps(data, -1)

Exception Type: PicklingError at /users/join/creative/
Exception Value: Can't pickle : attribute lookup django.contrib.auth.models.User_groups failed