Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 when trying to switch to next month #23

Open
Toniob opened this issue Apr 3, 2018 · 1 comment
Open

Error 500 when trying to switch to next month #23

Toniob opened this issue Apr 3, 2018 · 1 comment

Comments

@Toniob
Copy link
Contributor

Toniob commented Apr 3, 2018

Hi,

With extension 1.3.0, the events are working fine on the current month. But when I try to switch to the next month (May), I'm having an error :

Traceback:  

File "/dir/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/dir/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/dir/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/python3.5/contextlib.py" in inner
  30.                 return func(*args, **kwds)

File "/dir/lib/python3.5/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)

File "/dir/lib/python3.5/site-packages/rest_framework/viewsets.py" in view
  90.             return self.dispatch(request, *args, **kwargs)

File "/dir/lib/python3.5/site-packages/rest_framework/views.py" in dispatch
  489.             response = self.handle_exception(exc)

File "/dir/lib/python3.5/site-packages/rest_framework/views.py" in handle_exception
  449.             self.raise_uncaught_exception(exc)

File "/dir/lib/python3.5/site-packages/rest_framework/views.py" in dispatch
  486.             response = handler(request, *args, **kwargs)

File "/dir/lib/python3.5/site-packages/modoboa_radicale/viewsets.py" in list
  128.             parse_date_from_iso(start), parse_date_from_iso(end))

File "/dir/lib/python3.5/site-packages/modoboa_radicale/backends/caldav_.py" in get_events
  143.         orig_events = self.remote_cal.date_search(start, end)

File "/dir/src/caldav/caldav/objects.py" in date_search
  572.                       data=results[r][cdav.CalendarData.tag], parent=self))

File "/dir/src/caldav/caldav/objects.py" in __init__
  813.             self.data = data

File "/dir/src/caldav/caldav/objects.py" in _set_data
  898.                 to_unicode(self._data))

File "/dir/lib/python3.5/site-packages/icalendar/cal.py" in from_ical
  369.                     _timezone_cache[component['TZID']] = component.to_tz()

File "/dir/lib/python3.5/site-packages/icalendar/cal.py" in to_tz
  611.                 component, tzname

File "/dir/lib/python3.5/site-packages/icalendar/cal.py" in _extract_offsets
  540.             rrule = dateutil.rrule.rrulestr(rrulestr, dtstart=dtstart)

File "/dir/lib/python3.5/site-packages/dateutil/rrule.py" in __call__
  1664.         return self._parse_rfc(s, **kwargs)

File "/dir/lib/python3.5/site-packages/dateutil/rrule.py" in _parse_rfc
  1547.                                          tzinfos=tzinfos)

File "/dir/lib/python3.5/site-packages/dateutil/rrule.py" in _parse_rfc_rrule
  1506.         return rrule(dtstart=dtstart, cache=cache, **rrkwargs)

File "/dir/lib/python3.5/site-packages/dateutil/rrule.py" in __init__
  461.                     'RRULE UNTIL values must be specified in UTC when DTSTART '

Exception Type: ValueError at /api/v1/user-calendars/1/events/
Exception Value: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware
Request information:
USER: ******@6clones.fr

GET:
start = '2018-04-30'
_ = '1522766925092'
end = '2018-06-11'
@kryskool kryskool added the bug label Apr 3, 2018
@tonioo tonioo added this to the 1.3.1 milestone Apr 4, 2018
@tonioo
Copy link
Member

tonioo commented Apr 5, 2018

The error is raised by the dateutil package when it parses your event. Looks like developers recently decided to be more RFC compliant (see dateutil/dateutil#620) with inconsistency issues between DTSTART and UNTIL properties... Problem is, a lot a calendar clients generate wrong events (Outlook, Evolution, etc.)
For now, there is not easy way to fix this...

@tonioo tonioo removed this from the 1.3.1 milestone Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants