Closed jonathanathe closed 1 year ago
Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (local_calendar
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
local_calendar documentation local_calendar source (message by IssueLinks)
Experiencing the same error. Still present in Beta 4.
Similar, but not exactly the same error in 2025.6.0b4
Logger: homeassistant.loader
Source: components/local_calendar/calendar.py:9
First occurred: 1:23:09 PM (1 occurrences)
Last logged: 1:23:09 PM
Unexpected exception importing platform homeassistant.components.local_calendar.calendar
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/local_calendar/calendar.py", line 9, in <module>
from ical.calendar import Calendar
File "/usr/local/lib/python3.11/site-packages/ical/calendar.py", line 14, in <module>
from .event import Event
File "/usr/local/lib/python3.11/site-packages/ical/event.py", line 58, in <module>
class Event(ComponentModel):
File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 292, in __new__
cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/utils.py", line 258, in generate_model_signature
merged_params[param_name] = Parameter(
^^^^^^^^^^
File "/usr/local/lib/python3.11/inspect.py", line 2722, in __init__
raise ValueError('{!r} is not a valid parameter name'.format(name))
ValueError: 'class' is not a valid parameter name
config_entry-local_calendar-2c1d79d60144b5c15549f64d66468c69.json.txt
@jonathanathe do you have diagnostics information for the integration? fwiw nothing changed in local calendar here as far as I know. This is difficult to diagnose. Also interesting there are two unrelated errors.
e.g. the last change to ical
was 3 months ago: https://github.com/home-assistant/core/commit/fa35867765cb38a39c0e07c6c34ad771a5dec112
Is there a way to know what version of pydantic
folks are running here? This has been tested on 1.10.8
released a few weeks ago and also and it works fine on everything above 1.9.1
and below v2.
I am curious if there are other home assistant packages using pydantic that also see this.
I'm wondering if ha core rebuild
helps fix packages that are messed up?
config_entry-local_calendar-448b91024296ee3afde0968edb1512ef.json.txt
Here's my diagnostics @allenporter, I hope it helps.
Running just container 2023.6.0b5
EDIT: pip freeze says:
pydantic==1.9.2
FWIW the common custom components so far are:
"frigate",
"grocy",
"hacs",
What version of ical?
Both are using 4.5.1
of ical
which is current. grocy uses pydantic fwiw, so maybe there is something going off there...
Grocy hasn't updated for awhile though since 2022.
ha core rebuild
Hi @allenporter, I did the test with ha core rebuild
and it got it working again.
Thank you very much!
What would be the equivalent in a container install to ha core rebuild
?
So a ha core rebuild
didn't fix the issue, but when I subsequently updated from b4
to b6
the integration loaded fine.
🤷♂️
Still shows up in 2023.6.0 :frowning_face:
Found this https://github.com/tiangolo/fastapi/issues/5048#issuecomment-1229183881
Updating pydantic to 1.10.9 in my container worked.
We have a bump here https://github.com/home-assistant/core/pull/94178, i will tag it for the next patch release.
hm no, we only require it in HA for testing.
I wonder if we should add it to constraints @allenporter ?
:man_shrugging: all I can tell you is bumping it worked for me, I think it's a requirement in the grocy
integration, likely need to open an issue there.
EDIT: it's not a requirement for the grocy
3rd party integration, :man_shrugging:
The problem
When I updated today to Home Assistant 2023.6.0b1 the Local Calendar integration stopped working and I can't see my calendars and I can't create new ones.
What version of Home Assistant Core has the issue?
2023.6.0b1
What was the last working version of Home Assistant Core?
2023.5.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Local Calendar
Link to integration documentation on our website
https://www.home-assistant.io/integrations/local_calendar
Diagnostics information
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response