Project

General

Profile

Support #44999

erreur lors de l'import d'un fichier ICS avec un événement réccurent dont la date de fin est une datetime alors que l'occurence est une date

Added by Serghei Mihai 5 months ago. Updated 5 months ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09 Jul 2020
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Erreur l'instance de Villejuif avec l'ICS en pièce jointe:

Environment:

Request Method: POST
Request URL: https://dev-chrono.entrouvert.lan/manage/agendas/desk/2/import-exceptions-from-ics/

Django Version: 1.11.29
Python Version: 3.8.4
Installed Applications:
''
Installed Middleware:
''

Traceback:

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)

File "/home/serghei/dev/chrono/chrono/manager/views.py" in dispatch
  1021.         return super(ManagedAgendaSubobjectMixin, self).dispatch(request, *args, **kwargs)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/views/generic/base.py" in dispatch
  88.         return handler(request, *args, **kwargs)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/views/generic/edit.py" in post
  240.         return super(BaseUpdateView, self).post(request, *args, **kwargs)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/django/views/generic/edit.py" in post
  183.             return self.form_valid(form)

File "/home/serghei/dev/chrono/chrono/manager/views.py" in form_valid
  1607.                 exceptions = form.instance.import_timeperiod_exceptions_from_ics_file(

File "/home/serghei/dev/chrono/chrono/agendas/models.py" in import_timeperiod_exceptions_from_ics_file
  1115.         return self._import_timeperiod_exceptions_from_ics(source=source, data=force_text(ics_file.read()))

File "/home/serghei/dev/chrono/chrono/agendas/models.py" in _import_timeperiod_exceptions_from_ics
  1177.                 elif vevent.rruleset.count():

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/dateutil/rrule.py" in count
  202.             for x in self:

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/dateutil/rrule.py" in _iter
  1365.             self._genitem(rlist, gen)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/dateutil/rrule.py" in __init__
  1295.                 self.dt = advance_iterator(gen)

File "/home/serghei/sandbox/venvs/publik-env3/lib/python3.8/site-packages/dateutil/rrule.py" in _iter
  865.                             if until and res > until:

Exception Type: TypeError at /manage/agendas/desk/2/import-exceptions-from-ics/
Exception Value: can't compare offset-naive and offset-aware datetimes

C'est le bout:

BEGIN:VEVENT
RRULE:FREQ=DAILY;UNTIL=20200828T220000Z;INTERVAL=1
SUMMARY:Absent(e)
DTSTART;VALUE=DATE:20200810
DTEND;VALUE=DATE:20200811

qui provoque l'erreur.


Files

reachcalendar.ics (2.25 KB) reachcalendar.ics Serghei Mihai, 09 Jul 2020 06:18 PM

Related issues

Related to Chrono - Development #28767: Import d'un ICS : prise en charge de la règle RRULESolution déployée07 Dec 2018

Actions

History

#2

Updated by Serghei Mihai 5 months ago

Réproduit en local avec la version 0.9.3 de vobject.
Avec la 0.9.6, présente dans buster, ça passe.

#3

Updated by Benjamin Dauvergne 5 months ago

  • Related to Development #28767: Import d'un ICS : prise en charge de la règle RRULE added
#4

Updated by Benjamin Dauvergne 5 months ago

Bug connu déjà analysé dans #28767, c'est un bug dans la version de dateutil en stretch.

Also available in: Atom PDF