Open CaptainSweatpants opened 1 year ago
That value error looks like the format of your feed changed. try using wget
or curl
on the url for your calendar feed and see if its in the proper ical format.
So, to check for the ical validation i used icalendar.org’s ical validator and it returned File Size: 549 lines, 15910 bytes Number of events found: 75 Number of timezones found: 1 Success! No errors found.
I also have no issues importing this ical calendar URL with any of my other email platforms such as AppleMail or Outlook. I have also tried the custom component “Icalendar” and its also working to import my ical file. It uses the “rie” parser. It lacks breaking my events into sensors as this component does, but for my purposes i didnt need that feature. But this does lean me toward the issue being with this component specifically.
This just started about a week ago.
Home Assistant 2023.6.3 Supervisor 2023.06.4 Operating System 10.2 Frontend 20230608.0 - latest
`Logger: homeassistant.components.sensor Source: custom_components/ical/init.py:135 Integration: Sensor (documentation, issues) First occurred: 10:28:29 AM (1 occurrences) Last logged: 10:28:29 AM
Error while setting up ical platform for sensor Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/icalendar/parser.py", line 339, in parts validate_token(name) File "/usr/local/lib/python3.11/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 "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 320, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/ical/sensor.py", line 47, in async_setup_entry await ical_events.update() File "/config/custom_components/ical/init.py", line 135, in update event_list = icalendar.Calendar.from_ical(text.replace("\x00", "")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/icalendar/cal.py", line 328, in from_ical name, params, vals = line.parts() ^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/icalendar/parser.py", line 351, in parts raise ValueError( ValueError: Content line could not be parsed into parts: '<!doctype html>
Any ideas what broke?