-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Local To-do 2.0 DTSTAMP issues #115906
Comments
Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) local_todo documentation |
Hi, this isn't a bug in home assistant. DTSTAMP is part of the rfc5545. Edit: see correction below. |
Actually I see it's in VTIMEZONE which doesn't list that, so that could be omitted to be friendlier. |
1 similar comment
Actually I see it's in VTIMEZONE which doesn't list that, so that could be omitted to be friendlier. |
Thanks for double checking. I noticed that you maintain both projects yesterday too. |
The problem
I export a few local to-do lists from HA to a different VM, I copy the files from the .storage dir via ssh. It looks like the ICS format on HA between V1.0 and V2.0 has changed significantly. The new V2.0 ICS file crashes the ics python library. The ICS file is any without any items in the to-do list. I don't know the ICS file format and I'm not sure what DTSTAMP is used for, in my shopping list I only care for items, I don't use time. I did see some older bugs with tz issues. I'm not sure if what I'm seeing is a bug on HA side or the other library, but the output from HA is the cause of the issue. But I did also create a bug for ics lib ics-py/ics-py#415
Btw, when I switch back to a backup of the old file format as a test it works. All my code executes on this different VM.
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
What version of Home Assistant Core has the issue?
core-2024.4.3
What was the last working version of Home Assistant Core?
was working last month
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Local To-do
Link to integration documentation on our website
https://www.home-assistant.io/integrations/local_todo
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: