Can not import Gmail agenda which uses duration over several days #10

Closed
opened 2019-07-05 20:46:17 +02:00 by eschuermann · 4 comments
eschuermann commented 2019-07-05 20:46:17 +02:00 (Migrated from github.com)

Submitting Issues

Please only submit reproducible issues and write the instructions on how to reproduce them.

When you are submitting a new issue, please supply the following information:

  • Version info; Copy the data inside the Info.txt file (/home/pi/E-Paper-Master/Info.txt). If there's no such file, you are using an outdated version. Please consider updating.

This document contains a short info of the E-Paper-Calendar software version

Version: 1.6
Installer version: 1.6 (Mid March 2019)
configuration file: /home/pi/E-Paper-Master/Calendar/settings.py
If the time was set correctly, you installed this software on:
Wed 3 Jul 23:27:08 CEST 2019

  • Error output: Any errors of the Main script can be found in /home/pi/E-Paper-Master/E-Paper-err.log. You don't need to copy the entire file (please don't) but rather the latest errors that occured.

Starting new loop
Datetime: 2019-07-05 20:31:42.757701

Fetching weather information from open weather map
Fetching events from your calendar
Traceback (most recent call last):
File "./E-Paper.py", line 115, in
main()
File "./E-Paper.py", line 87, in main
design.add_calendar(events_cal)
File "/home/pi/E-Paper-Master/Calendar/DayListPanel.py", line 46, in add_calendar
row.add_calendar(calendar)
File "/home/pi/E-Paper-Master/Calendar/DayHeaderDesign.py", line 54, in add_calendar
self.draw_event_list(calendar.get_upcoming_events(time_until_tomorrow, now))
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 37, in get_upcoming_events
return self.get_events_in_range(start_time, timespan)
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 69, in get_events_in_range
event_occurrence = self.get_if_event_in_range(event, start, duration)
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 84, in get_if_event_in_range
return self.is_repeating_in_range(event, start, duration)
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 106, in is_repeating_in_range
rule=rrulestr(r_string,dtstart=event.begin_datetime)
File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 1731, in call
return self._parse_rfc(s, **kwargs)
File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 1653, in _parse_rfc
tzinfos=tzinfos)
File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 1560, in _parse_rfc_rrule
return rrule(dtstart=dtstart, cache=cache, **rrkwargs)
File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 470, in init
'RRULE UNTIL values must be specified in UTC when DTSTART '
ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware

  • Changes made: If you have made any changes (apart from personal information), also include them to help debugging.
    No changes made

  • Description: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.

  • Steps to reproduce: List the step by step process to reproduce the issue.
    Configured two agenda's: one in Google Apps (google Business), and one within a regular Gmail account.
    Create one event that spans several days, in both agenda's
    The Google apps for business one will import. The gmail calendar entry results in the shown error.

  • Results: Describe what you expected to see and what you actually saw.
    Expectation is that agenda will be imported and shown on the display. It actually breaks the program, resulting in the program to exit.

  • Additional Notes: Provide any other relevant notes not previously mentioned. This is optional.

https://stackoverflow.com/questions/53997143/valueerror-rrule-until-values-must-be-specified-in-utc-when-dtstart-is-timezone
https://github.com/dateutil/dateutil/issues/851
https://github.com/pimutils/khal/issues/767

# Submitting Issues Please only submit reproducible issues and write the instructions on how to reproduce them. When you are submitting a new issue, please supply the following information: * **Version info;** Copy the data inside the Info.txt file (`/home/pi/E-Paper-Master/Info.txt`). If there's no such file, you are using an outdated version. Please consider updating. This document contains a short info of the E-Paper-Calendar software version Version: 1.6 Installer version: 1.6 (Mid March 2019) configuration file: /home/pi/E-Paper-Master/Calendar/settings.py If the time was set correctly, you installed this software on: Wed 3 Jul 23:27:08 CEST 2019 * **Error output:** Any errors of the Main script can be found in `/home/pi/E-Paper-Master/E-Paper-err.log`. You don't need to copy the entire file (please don't) but rather the latest errors that occured. __________Starting new loop__________ Datetime: 2019-07-05 20:31:42.757701 Fetching weather information from open weather map Fetching events from your calendar Traceback (most recent call last): File "./E-Paper.py", line 115, in <module> main() File "./E-Paper.py", line 87, in main design.add_calendar(events_cal) File "/home/pi/E-Paper-Master/Calendar/DayListPanel.py", line 46, in add_calendar row.add_calendar(calendar) File "/home/pi/E-Paper-Master/Calendar/DayHeaderDesign.py", line 54, in add_calendar self.__draw_event_list__(calendar.get_upcoming_events(time_until_tomorrow, now)) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 37, in get_upcoming_events return self.__get_events_in_range__(start_time, timespan) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 69, in __get_events_in_range__ event_occurrence = self.__get_if_event_in_range__(event, start, duration) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 84, in __get_if_event_in_range__ return self.__is_repeating_in_range__(event, start, duration) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 106, in __is_repeating_in_range__ rule=rrulestr(r_string,dtstart=event.begin_datetime) File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 1731, in __call__ return self._parse_rfc(s, **kwargs) File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 1653, in _parse_rfc tzinfos=tzinfos) File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 1560, in _parse_rfc_rrule return rrule(dtstart=dtstart, cache=cache, **rrkwargs) File "/home/pi/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 470, in __init__ 'RRULE UNTIL values must be specified in UTC when DTSTART ' ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware * **Changes made:** If you have made any changes (apart from personal information), also include them to help debugging. No changes made * **Description**: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem. * **Steps to reproduce:** List the step by step process to reproduce the issue. Configured two agenda's: one in Google Apps (google Business), and one within a regular Gmail account. Create one event that spans several days, in both agenda's The Google apps for business one will import. The gmail calendar entry results in the shown error. * **Results**: Describe what you expected to see and what you actually saw. Expectation is that agenda will be imported and shown on the display. It actually breaks the program, resulting in the program to exit. * **Additional Notes:** Provide any other relevant notes not previously mentioned. This is optional. https://stackoverflow.com/questions/53997143/valueerror-rrule-until-values-must-be-specified-in-utc-when-dtstart-is-timezone https://github.com/dateutil/dateutil/issues/851 https://github.com/pimutils/khal/issues/767
mgfcf commented 2019-07-05 22:10:25 +02:00 (Migrated from github.com)

Hey @eschuermann , thanks for using the software and helping to improve it further!

I investigated the issue but can't reproduce the same error. Only if I change the code, remove some of the functions that are designed to prohibit that exact error, I am able to trigger this response, which does not indicate any current bugs with my test calendars.
But I am quite sure, that your message is valid, due to the problem being very annoying during development.

I have updated the software with some additional error logging. Could you update the software with the installer and send me the new output? It now prints the RRULE (Recurrence Rule) and DTSTART (Start of event) of the first event that causes this exception.

Max

Hey @eschuermann , thanks for using the software and helping to improve it further! I investigated the issue but can't reproduce the same error. Only if I change the code, remove some of the functions that are designed to prohibit that exact error, I am able to trigger this response, which does not indicate any current bugs with my test calendars. But I am quite sure, that your message is valid, due to the problem being very annoying during development. I have updated the software with some additional error logging. Could you update the software with the installer and send me the new output? It now prints the RRULE (Recurrence Rule) and DTSTART (Start of event) of the first event that causes this exception. Max
eschuermann commented 2019-07-06 16:37:17 +02:00 (Migrated from github.com)

Hi Max,

I have updated the software and tested it again. I still get the errormessage. I had to freshly install my rapsberry pi zero, and now it uses Python 3.7 out of the box (former message was with 3.5). Don't know if this is a problem?

Basically the problem is in recurring birthdays as you can see. Apologies that it is a bit different as first suggested.

"is_repeating_in_range" failed while processing: dtstart=2014-09-15 00:00:00+02:00 dtstart.tzinfo=CEST rrule=FREQ=YEARLY;WKST=MO;UNTIL=20240914
Traceback (most recent call last):
File "./E-Paper.py", line 115, in
main()
File "./E-Paper.py", line 87, in main
design.add_calendar(events_cal)
File "/home/pi/E-Paper-Master/Calendar/MonthOvPanel.py", line 79, in add_calendar
month_events = list(set([ (event.begin_datetime.day, event.begin_datetime.month, event.begin_datetime.year) for event in calendar.get_month_events()]))
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 58, in get_month_events
return self.get_events_in_range(month_start, timedelta(month_days))
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 69, in get_events_in_range
event_occurrence = self.get_if_event_in_range(event, start, duration)
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 84, in get_if_event_in_range
return self.is_repeating_in_range(event, start, duration)
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 118, in is_repeating_in_range
raise ex
File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 108, in is_repeating_in_range
rule=rrulestr(r_string,dtstart=event.begin_datetime)
File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 1731, in call
return self._parse_rfc(s, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 1653, in _parse_rfc
tzinfos=tzinfos)
File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 1560, in _parse_rfc_rrule
return rrule(dtstart=dtstart, cache=cache, **rrkwargs)
File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 470, in init
'RRULE UNTIL values must be specified in UTC when DTSTART '
ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware

Hi Max, I have updated the software and tested it again. I still get the errormessage. I had to freshly install my rapsberry pi zero, and now it uses Python 3.7 out of the box (former message was with 3.5). Don't know if this is a problem? Basically the problem is in recurring birthdays as you can see. Apologies that it is a bit different as first suggested. "is_repeating_in_range" failed while processing: dtstart=2014-09-15 00:00:00+02:00 dtstart.tzinfo=CEST rrule=FREQ=YEARLY;WKST=MO;UNTIL=20240914 Traceback (most recent call last): File "./E-Paper.py", line 115, in <module> main() File "./E-Paper.py", line 87, in main design.add_calendar(events_cal) File "/home/pi/E-Paper-Master/Calendar/MonthOvPanel.py", line 79, in add_calendar month_events = list(set([ (event.begin_datetime.day, event.begin_datetime.month, event.begin_datetime.year) for event in calendar.get_month_events()])) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 58, in get_month_events return self.__get_events_in_range__(month_start, timedelta(month_days)) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 69, in __get_events_in_range__ event_occurrence = self.__get_if_event_in_range__(event, start, duration) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 84, in __get_if_event_in_range__ return self.__is_repeating_in_range__(event, start, duration) File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 118, in __is_repeating_in_range__ raise ex File "/home/pi/E-Paper-Master/Calendar/CalendarInterface.py", line 108, in __is_repeating_in_range__ rule=rrulestr(r_string,dtstart=event.begin_datetime) File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 1731, in __call__ return self._parse_rfc(s, **kwargs) File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 1653, in _parse_rfc tzinfos=tzinfos) File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 1560, in _parse_rfc_rrule return rrule(dtstart=dtstart, cache=cache, **rrkwargs) File "/usr/local/lib/python3.7/dist-packages/dateutil/rrule.py", line 470, in __init__ 'RRULE UNTIL values must be specified in UTC when DTSTART ' ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware
mgfcf commented 2019-07-07 18:19:10 +02:00 (Migrated from github.com)

Thanks, that helped a lot! It seems like the adding of the timezone did not work, if UNTIL is the last parameter specified in the RRULE. For example: Your UNTIL looks like this "UNTIL=20240914", but should look like this "UNTIL=20240914T000000Z". This is now fixed and updated.

Please update your software and report back, if you still encounter any issues or if it works as it should.

Feel free to report any other issues or share your ideas in a new thread.

Max

Thanks, that helped a lot! It seems like the adding of the timezone did not work, if UNTIL is the last parameter specified in the RRULE. For example: Your UNTIL looks like this "UNTIL=20240914", but should look like this "UNTIL=20240914T000000Z". This is now fixed and updated. Please update your software and report back, if you still encounter any issues or if it works as it should. Feel free to report any other issues or share your ideas in a new thread. Max
eschuermann commented 2019-07-09 20:15:31 +02:00 (Migrated from github.com)

Hi Max,

i tested it, and now everything works, I don't get an error message. Unfortunately I can't test it right now on the epaper screen itself, as it decided to stop working. But I think it looks good!

Many thanks for your swift responses,
Erwin

Hi Max, i tested it, and now everything works, I don't get an error message. Unfortunately I can't test it right now on the epaper screen itself, as it decided to stop working. But I think it looks good! Many thanks for your swift responses, Erwin
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: m.giller/E-Paper-Calendar#10
No description provided.