You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I export a few local to-do lists from Home Assistant. It looks like the ICS format on HA between V1.0 and V2.0 has changed. The new V2.0 ICS file crashes the ics python library. The ICS file is without any items in the to-do list, but this never caused an issue with V1.0. I don't know the ICS file format and I'm not sure what DTSTAMP is used for. I'm not sure if what I'm seeing is a bug. Maybe this is an issue with the HA, so I also submitted a bug: home-assistant/core#115906
Traceback (most recent call last):
File "/root/./hassio/homeassistant/python_scripts/sh_l2.py", line 45, in
c = Calendar(f.read())
File "/usr/local/lib/python3.10/dist-packages/ics/icalendar.py", line 69, in init
self._populate(containers[0]) # Use first calendar
File "/usr/local/lib/python3.10/dist-packages/ics/component.py", line 59, in _populate
parser(self, lines) # Send a list or empty list
File "/usr/local/lib/python3.10/dist-packages/ics/parsers/icalendar_parser.py", line 59, in parse_vtimezone
timezones = tzical(fake_file) # tzical does not like strings
File "/usr/local/lib/python3.10/dist-packages/dateutil/tz/tz.py", line 1279, in init
self._parse_rfc(fobj.read())
File "/usr/local/lib/python3.10/dist-packages/dateutil/tz/tz.py", line 1449, in _parse_rfc
raise ValueError("unsupported property: "+name)
ValueError: unsupported property: DTSTAMP
Here is the code, nothing special
44 f = open("/root/hassio/homeassistant/sam_s_shopping_list.ics", "r")
45 c = Calendar(f.read())
46 f.close()
new and not working sam_s_shopping_list.ics
BEGIN:VCALENDAR
PRODID:-//homeassistant.io//local_todo 2.0//EN
VERSION:2.0
BEGIN:VTIMEZONE
DTSTAMP:20240421T012017
TZID:America/New_York
BEGIN:STANDARD
DTSTART:20101107T020000
TZOFFSETTO:-0500
TZOFFSETFROM:-0400
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20100314T020000
TZOFFSETTO:-0400
TZOFFSETFROM:-0500
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
old and working sam_s_shopping_list.ics
BEGIN:VCALENDAR
PRODID:-//homeassistant.io//local_todo 1.0//EN
VERSION:2.0
END:VCALENDAR
I export a few local to-do lists from Home Assistant. It looks like the ICS format on HA between V1.0 and V2.0 has changed. The new V2.0 ICS file crashes the ics python library. The ICS file is without any items in the to-do list, but this never caused an issue with V1.0. I don't know the ICS file format and I'm not sure what DTSTAMP is used for. I'm not sure if what I'm seeing is a bug. Maybe this is an issue with the HA, so I also submitted a bug: home-assistant/core#115906
Traceback (most recent call last):
File "/root/./hassio/homeassistant/python_scripts/sh_l2.py", line 45, in
c = Calendar(f.read())
File "/usr/local/lib/python3.10/dist-packages/ics/icalendar.py", line 69, in init
self._populate(containers[0]) # Use first calendar
File "/usr/local/lib/python3.10/dist-packages/ics/component.py", line 59, in _populate
parser(self, lines) # Send a list or empty list
File "/usr/local/lib/python3.10/dist-packages/ics/parsers/icalendar_parser.py", line 59, in parse_vtimezone
timezones = tzical(fake_file) # tzical does not like strings
File "/usr/local/lib/python3.10/dist-packages/dateutil/tz/tz.py", line 1279, in init
self._parse_rfc(fobj.read())
File "/usr/local/lib/python3.10/dist-packages/dateutil/tz/tz.py", line 1449, in _parse_rfc
raise ValueError("unsupported property: "+name)
ValueError: unsupported property: DTSTAMP
Here is the code, nothing special
44 f = open("/root/hassio/homeassistant/sam_s_shopping_list.ics", "r")
45 c = Calendar(f.read())
46 f.close()
new and not working sam_s_shopping_list.ics
BEGIN:VCALENDAR
PRODID:-//homeassistant.io//local_todo 2.0//EN
VERSION:2.0
BEGIN:VTIMEZONE
DTSTAMP:20240421T012017
TZID:America/New_York
BEGIN:STANDARD
DTSTART:20101107T020000
TZOFFSETTO:-0500
TZOFFSETFROM:-0400
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20100314T020000
TZOFFSETTO:-0400
TZOFFSETFROM:-0500
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
old and working sam_s_shopping_list.ics
BEGIN:VCALENDAR
PRODID:-//homeassistant.io//local_todo 1.0//EN
VERSION:2.0
END:VCALENDAR
I updated everything I could think about:
Package Version
annotated-types 0.6.0
arrow 1.3.0
attrs 23.1.0
command-not-found 0.3
dbus-python 1.2.18
distro-info 1.1+ubuntu0.2
ical 7.0.3
ics 0.7.2
netifaces 0.11.0
pip 22.0.2
pydantic 2.7.0
pydantic_core 2.18.1
PyGObject 3.42.1
pyparsing 3.1.2
python-apt 2.4.0+ubuntu3
python-dateutil 2.8.2
PyYAML 5.4.1
setuptools 59.6.0
six 1.16.0
TatSu 5.8.3
types-python-dateutil 2.8.19.14
typing_extensions 4.11.0
tzdata 2024.1
ubuntu-pro-client 8001
ufw 0.36.1
wheel 0.37.1
The text was updated successfully, but these errors were encountered: