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

[BUG] Incorrect handling of complex recurring events (e.g., in calendars imported from Google Calendar) #593

Open
3 tasks
wzab opened this issue Feb 8, 2024 · 0 comments

Comments

@wzab
Copy link

wzab commented Feb 8, 2024

Describe the bug

I needed to import a heavily edited Google Calendar for further processing in Python on a local machine.
Certain events were initially created as instances of a recurring event, but then they were shifted or otherwise modifed.
As the result, the "ics" file exported by the Google Calendar could not be correctly interpreted by icalendar library.
The start date of the first event in the cycle (even though excluded) was displayed as the start date of the particular event.
The "ics" file itself is correct. After importing it to Thunderbird, the correct set of events is shown. Also the ical2htnl tool based on the old libical library generates the correct calendar. I attach an archive with the ics file exposing the problem and with the correct output generated by ical2html.

To Reproduce

Run the icalendar tool on the provided file:

icalendar linsw.ics

Find the "L5B G3" event in the output:

    Summary    : L5B G3 LINSW
    Starts     : Fri Mar  8 11:15:00 2024
    End        : Fri Mar  8 14:00:00 2024
    Duration   : 2:45:00
    Location   : Somewhere, Certain city
    Comment    : 
    Description:
     

    Organizer: 
    Attendees:

Run the ical2html file using the old libical library:

ical2html 20240201 P21W linsw.ics > linsw.html

You should get the HTML file with table, where "L5B G3" event is correctly scheduled on June 14.

Environment

  • OS: Debian/testing
  • Python version: Python 3.11.7
  • icalendar version: 5.0.11

Additional context

  • [ no ] I tested it with the latest version pip3 install https://github.com/collective/icalendar.git
  • [ yes ] I attached the ICS source file or there is no ICS source file

I couldnt test it with the latest version. An attempt to install it in a virtual environment resulted in another error:

pip3 install https://github.com/collective/icalendar.git
Collecting https://github.com/collective/icalendar.git
  Downloading https://github.com/collective/icalendar.git
     / 296.2 kB 1.4 MB/s 0:00:00
  ERROR: Cannot unpack file /tmp/pip-unpack-4rqg8rs3/icalendar.git (downloaded from /tmp/pip-req-build-rt7rmbmr, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-rt7rmbmr

demo.zip

@wzab wzab changed the title [BUG] Incorrect handling of comnplex recurring events (e.g., in calendars imported from Google Calendar) [BUG] Incorrect handling of complex recurring events (e.g., in calendars imported from Google Calendar) Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant