Monday, September 26, 2011

psycopg2 pickling error

Hello,

since a while I see very often those errors:
Traceback (most recent call last):

File "/opt/agileamp/lib/python/django/core/handlers/base.py", line
89, in get_response
response = middleware_method(request)

File "/usr/local/lib/python2.6/dist-packages/newrelic-0.5.15.41-
py2.6.egg/newrelic/api/function_trace.py", line 137, in __call__
return self._nr_next_object(*args, **kwargs)

File "/usr/local/lib/python2.6/dist-packages/newrelic-0.5.15.41-
py2.6.egg/newrelic/api/name_transaction.py", line 58, in __call__
return self._nr_next_object(*args, **kwargs)

File "/opt/agileamp/scrumtool/utils/middleware/customer.py", line 19,
in process_request
customer = Company.objects.get(account__subdomain =
request.subdomain)

File "/opt/agileamp/lib/python/django/db/models/manager.py", line
132, in get
return self.get_query_set().get(*args, **kwargs)

File "/opt/agileamp/scrumtool/agile_cache/managers.py", line 117, in
get
return super(CachingQuerySet, self).get(*args, **kwargs)

File "/opt/agileamp/lib/python/django/db/models/query.py", line 344,
in get
num = len(clone)

File "/opt/agileamp/lib/python/django/db/models/query.py", line 82,
in __len__
self._result_cache = list(self.iterator())

File "/opt/agileamp/scrumtool/agile_cache/managers.py", line 87, in
iterator
cache.add(obj.cache_key, obj, 60 * 60 * 24)

File "/opt/agileamp/lib/python/django/core/cache/backends/
memcached.py", line 54, in add
return self._cache.add(key, value,
self._get_memcache_timeout(timeout))

File "/usr/local/lib/python2.6/dist-packages/newrelic-0.5.15.41-
py2.6.egg/newrelic/api/memcache_trace.py", line 113, in __call__
return self._nr_next_object(*args, **kwargs)

File "/usr/lib/pymodules/python2.6/memcache.py", line 456, in add
return self._set("add", key, val, time, min_compress_len)

File "/usr/lib/pymodules/python2.6/memcache.py", line 725, in _set
store_info = self._val_to_store_info(val, min_compress_len)

File "/usr/lib/pymodules/python2.6/memcache.py", line 697, in
_val_to_store_info
pickler.dump(val)

PicklingError: Can't pickle <class 'psycopg2.tz.FixedOffsetTimezone'>:
it's not the same object as psycopg2.tz.FixedOffsetTimezone

I have upgraded psycopg2 to version 2.4.2 (the FixedOffsetTimezone
should contain a fix for pickling errors - http://initd.org/psycopg/docs/tz.html),
but I still see the error. I have contacted newrelic about the issue,
but they see this issue not related to newrelic.

Has someone a hint how I can nail that issue down?

Many thanks, tom

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate