Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » can't pickle Input objects -- error in django 1.3 beta 1 with memcached cache backend [RSS Feed]

#1 Dec. 27, 2010 18:40:20

Viktor K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

can't pickle Input objects -- error in django 1.3 beta 1 with memcached cache backend


Hi,

With django 1.3 alpha 1, I was using the following piece of code in my
urls.py without a problem:

cache_page(views.IndexView.as_view(), timeout)


When upgrading to 1.3 beta 1, I got this error:

Environment:


Request Method: GET
Request URL:http://localhost:8000/bg/Django Version: 1.3 beta 1
Python Version: 2.6.6
Installed Applications:

Installed Middleware:
('localeurl.middleware.LocaleURLMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


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 "/usr/local/lib/python2.6/dist-packages/django/utils/
decorators.py" in _wrapped_view
101. result =
middleware.process_response(request, response)
File "/usr/local/lib/python2.6/dist-packages/django/middleware/
cache.py" in process_response
89. self.cache.set(cache_key, response, timeout)
File "/usr/local/lib/python2.6/dist-packages/django/core/cache/
backends/memcached.py" in set
64. self._cache.set(key, value,
self._get_memcache_timeout(timeout))
File "/usr/local/lib/python2.6/dist-packages/memcache.py" in set
525. return self._set("set", key, val, time,
min_compress_len)
File "/usr/local/lib/python2.6/dist-packages/memcache.py" in _set
739. store_info = self._val_to_store_info(val,
min_compress_len)
File "/usr/local/lib/python2.6/dist-packages/memcache.py" in
_val_to_store_info
711. pickler.dump(val)
File "/usr/lib/python2.6/copy_reg.py" in _reduce_ex
70. raise TypeError, "can't pickle %s objects" %
base.__name__

Exception Type: TypeError at /
Exception Value: can't pickle Input objects

With the val in question being this:

<django.template.response.TemplateResponse object at 0x7f2c49989690>

Can someone guide me into fixing the invocation, or should I file a
bug against beta 1?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » can't pickle Input objects -- error in django 1.3 beta 1 with memcached cache backend [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support