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 with datetime #38

Open
rgabrielson11 opened this issue Nov 19, 2023 · 3 comments
Open

Error with datetime #38

rgabrielson11 opened this issue Nov 19, 2023 · 3 comments

Comments

@rgabrielson11
Copy link

Hello,

Trying installing the script for the first time today. Getting this error in the logs:

Error retrieving iCal data (can't compare offset-naive and offset-aware datetimes)

Any thoughts?

@andrewramsay
Copy link
Owner

Based on the exception text it could be something going wrong inside the icalevents package that the script uses to parse iCal sources.

If you can share a minimal example of the source that is producing the error I'd be happy to take a look at it and see if I can find the root cause. Also if you can tell me which Python version and platform you're running the script on that would be useful to know.

@rgabrielson11
Copy link
Author

Hi, on python 3.9.2

Ill work on a dataset that I can send over

@dm9
Copy link

dm9 commented Jul 19, 2024

Not sure if we are looking at the same cause, but I get the same error from an .ics where the DTSTART timezone is recognized (hence offset-aware) but the DTEND timezone is defined only in a VTIMEZONE component that appears in the .ics after the reference to it (and therefore icalendar ignores the timezone altogether and renders it offset-naive). Basically, it appears that icalendar.Component.from_ical( ) cannot cope with forward references to VTIMEZONEs. I think the fix to icalendar is not hard, but I can't get its out-of-the-box test cases to run successfully so I haven't gotten very far with that.

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

3 participants