dcramer/sentry — Issue #365: Time zone error
Author: mbaechtold
Created: 2012-02-27 09:27:38+00:00
State: open

This happens with Sentry 3.3.1, Python 2.6, PostgreSQL 8.4 on Debian Squeeze:

Traceback (most recent call last):
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/core/handlers/base.py", line 89, in get_response
response = middleware_method(request)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/middleware/locale.py", line 16, in process_request
language = translation.get_language_from_request(request)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 124, in get_language_from_request
return _trans.get_language_from_request(request)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 372, in get_language_from_request
lang_code = request.session.get('django_language', None)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/contrib/sessions/backends/base.py", line 64, in get
return self._session.get(key, default)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/contrib/sessions/backends/base.py", line 195, in _get_session
self._session_cache = self.load()
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/contrib/sessions/backends/db.py", line 20, in load
expire_date__gt=datetime.datetime.now()
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/models/query.py", line 344, in get
num = len(clone)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/models/query.py", line 82, in __len__
self._result_cache = list(self.iterator())
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/models/query.py", line 273, in iterator
for row in compiler.results_iter():
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 680, in results_iter
for rows in self.execute_sql(MULTI):
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 734, in execute_sql
cursor = self.connection.cursor()
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/backends/__init__.py", line 252, in cursor
cursor = util.CursorWrapper(self._cursor(), self)
File "/path/to/virtualenv/of/sentry/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 148, in _cursor
cursor.execute("SET TIME ZONE %s", [settings_dict['TIME_ZONE']])
ProgrammingError: execute cannot be used while an asynchronous query is underway