KoljaWindeler / ics

Integration that displays the next event of an ics link (support reoccuring events)
51 stars 12 forks source link

Some calendars not supported? #31

Open lb3ne opened 3 years ago

lb3ne commented 3 years ago

Edit: After some investigation, there could be some issues elsewhere then ics...! The first calendar actually doesn't work (Mail sent to calendar owner), period. The other one works in Apple Calendar, but not in ics.

Not sure if this is a "valid" issue here, but this worked some months ago with ics-integration.

The links (http://www.ikstart.no/terminliste/subscribe this gives 404) and https://www.footballwebpages.co.uk/bolton-wanderers/calendar.ics?reminder=0 (the Bolton one works in Apple Calendar) was used to show football-matches, but now it only show invalid link, and a lot of noise in log:

Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:131 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

============= ICS Integration Error ================ Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:130 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

thanks, Kolja Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:129 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/icalendar/parser.py", line 340, in parts validate_token(name) File "/usr/local/lib/python3.9/site-packages/icalendar/parser.py", line 128, in validate_token raise ValueError(name) ValueError: <!DOCTYPE html> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/ics/sensor.py", line 170, in get_data cal = Calendar.from_ical(cal_string) File "/usr/local/lib/python3.9/site-packages/icalendar/cal.py", line 330, in from_ical name, params, vals = line.parts() File "/usr/local/lib/python3.9/site-packages/icalendar/parser.py", line 352, in parts raise ValueError( ValueError: Content line could not be parsed into parts: '<!DOCTYPE html>': <!DOCTYPE html> Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/icalendar/parser.py", line 340, in parts validate_token(name) File "/usr/local/lib/python3.9/site-packages/icalendar/parser.py", line 128, in validate_token raise ValueError(name) ValueError: {"status" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/ics/sensor.py", line 170, in get_data cal = Calendar.from_ical(cal_string) File "/usr/local/lib/python3.9/site-packages/icalendar/cal.py", line 330, in from_ical name, params, vals = line.parts() File "/usr/local/lib/python3.9/site-packages/icalendar/parser.py", line 352, in parts raise ValueError( ValueError: Content line could not be parsed into parts: '{"status":404,"message":"Page [/sta/terminliste/subscribe] not found"}': {"status" Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:128 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

and paste the following output: Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:127 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

https://github.com/KoljaWindeler/ics/issues Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:127 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

https://github.com/KoljaWindeler/ics/issues Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.ics.sensor Source: custom_components/ics/sensor.py:125 Integration: ics (documentation) First occurred: 8. juli 2021, 20:14:04 (9184 occurrences) Last logged: 11:09:26

============= ICS Integration Error ================

The logs could be in wrong order, but as shown, 9184 times last 24 hours...?

This two links works 100%: https://f1calendar.com/download/f1-calendar_p1_p2_p3_q_gp.ics?t=1608560562819 and https://ics.ecal.com/ecal-sub/5fc1835021058a957b8b458c/Tottenham%20Hotspur%20FC.ics. Not sure if that is relevant info, but the ics-installation works with some calendars.

"Denne feilen stammer fra en tilpasset integrasjon" = This error is from a custom integration, if Google couldn't translate...

Did I do anything wrong here?

KoljaWindeler commented 3 years ago

Hi, I think you're right .. https://www.footballwebpages.co.uk/bolton-wanderers/calendar.ics?reminder=0 doesn't work that way. if you run "curl https://www.footballwebpages.co.uk/bolton-wanderers/calendar.ics?reminder=0" you'll see that its actually a cloudfare protected website. I'd suggest to download the ICS, store it in your HA installation and read it locally