Contributors mailing list archives


Re: datetime error when accessing parts of Odoo

Druidoo SAS, Iván Todorovich
- 05/01/2020 00:04:40
Hi Nathan!

Check if the user has a timezone configured in his preferences.

I remember encountering something like this a while back

Le sam. 4 janv. 2020 à 16:02, Nathan Kennedy <> a écrit :
Hello Contributors,

I am running Odoo v10 and I have an odd error that has just started popping up and it only seems to appear in the Discuss, Sales, and Project Tasks:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/odoo/", line 642, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/odoo/", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/odoo/", line 334, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/odoo/service/", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/odoo/", line 327, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/odoo/", line 942, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/odoo/", line 507, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/odoo/addons/calendar/controllers/", line 65, in notify
    return request.env['calendar.alarm_manager'].get_next_notif()
  File "/usr/lib/python2.7/dist-packages/odoo/addons/calendar/models/", line 380, in get_next_notif
    for one_date in meeting._get_recurrent_date_by_event():
  File "/usr/lib/python2.7/dist-packages/odoo/addons/calendar/models/", line 570, in _get_recurrent_date_by_event
    return [d.astimezone(pytz.UTC) if d.tzinfo else d for d in rset1]
  File "/usr/lib/python2.7/dist-packages/dateutil/", line 1144, in _iter
    self._genitem(rlist, gen)
  File "/usr/lib/python2.7/dist-packages/dateutil/", line 1082, in __init__
    self.dt = advance_iterator(gen)
  File "/usr/lib/python2.7/dist-packages/dateutil/", line 652, in _iter
    if until and res > until:
TypeError: can't compare offset-naive and offset-aware datetimes

Other users on the system do not get this error at all. The only thing I can think of that I did recently was to remove a recurring event from my google calendar that is no longer relevant.
Short of creating a new user I have not figured out a good solution and I was hoping someone here might be able to shine a light on what is causing the error.

Thank you,

Nathan Kennedy
Jack of all trades
Master of none
Just don't call me Jack

Post to: