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

Unable to include 2 calendars #24

Open
jkaberg opened this issue Jan 7, 2021 · 9 comments
Open

Unable to include 2 calendars #24

jkaberg opened this issue Jan 7, 2021 · 9 comments
Labels
question Further information is requested

Comments

@jkaberg
Copy link

jkaberg commented Jan 7, 2021

First, thanks for this awesome addon! 😄

I'm haveing some trouble adding the following calendars:

https://connect.garmin.com/modern/calendar/export/4ec9e47abf9447f19acd6a279823f3e7 results in:

hast_1             | 2021-01-07 21:56:46 ERROR (SyncWorker_16) [custom_components.ics.calendar] Joelstrening: Failed to open url: Forbidden
hast_1             | 2021-01-07 21:56:46 ERROR (MainThread) [custom_components.ics.calendar] Joelstrening: Failed to parse ICS!

and https://ukenr.no/ics/helligdager/no.ics results in:

hast_1             | 2021-01-07 21:56:46 ERROR (SyncWorker_2) [custom_components.ics.calendar] Helligdager: Failed to open url!
hast_1             | 2021-01-07 21:56:46 ERROR (MainThread) [custom_components.ics.calendar] Helligdager: Failed to parse ICS!

However both these parses fine in Nextcloud? I did an reference check with the iCalendar validator, and indeed they show some errors. I have 4 other ics calendars that works just fine so something with these two. The fact that NC parses them fine suggest the exception handling might a bit to strict?

Any way we could work around this @franc6 ?

Tested with 2.0.0-beta7 and 1.0.6 - both show the same error in the logs

@franc6
Copy link
Owner

franc6 commented Jan 8, 2021

Unfortunately, the libraries I'm using to parse the calendars are very picky. If the validator shows errors, it's unlikely the calendars will work. However, you might try both the beta and non-beta versions and see if one works. If one of them works, please report back here, just for future reference.

@jkaberg
Copy link
Author

jkaberg commented Jan 9, 2021

@franc6 yes I noticed that aswell while debugging.

I was thinking of replacing that library with something more modern and battle tested, any objections? If not, then I'll try and clobber together and PR this weekend

@franc6
Copy link
Owner

franc6 commented Jan 9, 2021 via email

@franc6
Copy link
Owner

franc6 commented Aug 11, 2021

@jkaberg I just noticed the first error in your logs is a failure to download the URL. I tried and both URLs appear to work. Could it have been a temporary issue, or is there a firewall in your HA system that would prevent accessing those URLs? The second one seems to parse fine with the non-BETA version (exclusive of its bugs regarding recurring events). The first one doesn't have any events in it.

I should be releasing v2.0 either today or early next week which will let you switch parsers on a per-calendar basis.

@franc6 franc6 added the question Further information is requested label Jan 4, 2022
@franc6
Copy link
Owner

franc6 commented Jan 4, 2022

@jkaberg Is this still a problem?

@jkaberg
Copy link
Author

jkaberg commented Jan 6, 2022

@franc6 sorry for late reply, I'm not sure. What I did was let Google (calendar) proxy the calendars which works fine (orignal calendar->google calendar->ics_calendar/home assistant), so I sorta worked around it. I'll give it a go again and let you know.

@franc6
Copy link
Owner

franc6 commented Aug 16, 2022

The first calendar won't download because of the user agent string, note the Forbidden in the first error message for it. The new user_agent option will work around that (I checked).
For the second calendar, it seems the rie parser can handle it.

@franc6 franc6 closed this as completed Aug 16, 2022
@franc6 franc6 added fixed Issue is believed to be fixed, but not yet verified by reporter and removed question Further information is requested fixed Issue is believed to be fixed, but not yet verified by reporter labels Aug 16, 2022
@franc6
Copy link
Owner

franc6 commented Aug 16, 2022

Spoke too soon; setting the user_agent didn't resolve the problem for the first calendar.

@franc6
Copy link
Owner

franc6 commented Oct 18, 2022

@jkaberg Were you using the user name and password features for any of your calendars?

@franc6 franc6 added the question Further information is requested label Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants