KoljaWindeler / ics

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

AttributeError: 'NoneType' object has no attribute 'upper' #43

Open Forcefx opened 2 years ago

Forcefx commented 2 years ago

HI,

your add-on works great for years, thank you. helped us a lot.

After Updating Home Assitant to core-2022.2.3 from last 2021 release

Now following failure accures in the Log:

AttributeError: 'NoneType' object has no attribute 'upper'

2022-02-07 21:12:44 ERROR (MainThread) [custom_components.ics.sensor] ============= ICS Integration Error ================ 2022-02-07 21:12:44 ERROR (MainThread) [custom_components.ics.sensor] unfortunately ICS hit an error, please open a ticket at 2022-02-07 21:12:44 ERROR (MainThread) [custom_components.ics.sensor] https://github.com/KoljaWindeler/ics/issues 2022-02-07 21:12:44 ERROR (MainThread) [custom_components.ics.sensor] and paste the following output: 2022-02-07 21:12:44 ERROR (MainThread) [custom_components.ics.sensor] Traceback (most recent call last): File "/config/custom_components/ics/sensor.py", line 180, in get_data reoccuring_events = recurring_ical_events.of(cal).between(start_date, end_date) File "/usr/local/lib/python3.9/site-packages/recurring_ical_events.py", line 468, in of a_calendar = x_wr_timezone.to_standard(a_calendar) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 149, in to_standard return walker.walk(calendar) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 64, in walk subcomponent = self.walk_event(subcomponent) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 74, in walk_event attributes[name] = self.walk_value(value) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 85, in walk_value return walk(value) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 103, in walk_value_vDDDTypes dt = self.walk_value(value.dt) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 85, in walk_value return walk(value) File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 126, in walk_value_datetime if self.is_UTC(dt): File "/usr/local/lib/python3.9/site-packages/x_wr_timezone.py", line 114, in is_UTC return dt.tzname().upper() == "UTC" AttributeError: 'NoneType' object has no attribute 'upper' thanks, Kolja 2022-02-07 21:12:44 ERROR (MainThread) [custom_components.ics.sensor] ============= ICS Integration Error ================