dcramer/sentry — Issue #292: Timezone issue with Django 1.4 and Sentry
Author: victorhooi
Created: 2012-01-08 21:48:08+00:00
State: open

Hi,

I'm attempting to run Django Sentry on Django 1.4 (alpha), and I seem to be hitting an issue with timezone awareness.

Originally, when I ran it, I got the rather nondescript message:

```
No handlers could be found for logger "sentry.errors.client"
```

As per the advice here (https://groups.google.com/d/topic/disqus-opensource/kULFXm42eQg/discussion), I added the following to my settings.py:

```
import logging
logger = logging.getLogger('sentry.errors')
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())
```

I then get the following on stderr:

```
Unable to process log entry: can't subtract offset-naive and offset-aware datetimes
Traceback (most recent call last):
File "/home/victorhooi/.virtualenvs/aegnexus/src/sentry/sentry/manager.py", line 321, in from_kwargs
group, is_new, is_sample = self._create_group(event, **group_kwargs)
File "/home/victorhooi/.virtualenvs/aegnexus/src/sentry/sentry/manager.py", line 365, in _create_group
silence_timedelta = date - group.last_seen
TypeError: can't subtract offset-naive and offset-aware datetimes
```

Cheers,
Victor