core: Calendar missing on CalDav integration
The problem
Since 2022.5 beta, I only have 2 of my 5 caldav calendars (Travail XX and Vacances from my yaml config)
What version of Home Assistant Core has the issue?
2022.5.0b2
What was the last working version of Home Assistant Core?
2022.4.0
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
caldav
Link to integration documentation on our website
https://www.home-assistant.io/integrations/caldav/
Diagnostics information
No response
Example YAML snippet
calendar:
- platform: caldav
username: user
password: !secret caldav
url: https://mysogocaldavserver
custom_calendars:
- name: XX
calendar: Agenda personnel
search: ".*"
- name: YY
calendar: YY
search: ".*"
- name: Travail XX
calendar: Agenda personnel
search: "^(Bureau|Travail)$"
- name: Vacances
calendar: Agenda personnel
search: "^(Vacances|Absent)$"
- name: Travail YY
calendar: YY
search: "^(Travail)$"
Anything in the logs that might be useful for us?
2022-04-29 10:26:06 ERROR (MainThread) [homeassistant.components.calendar] caldav: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update
await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 146, in update
event = copy.deepcopy(self.data.event)
File "/usr/local/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/local/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/lib/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
File "/usr/local/lib/python3.9/copy.py", line 263, in <genexpr>
args = (deepcopy(arg, memo) for arg in args)
File "/usr/local/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/local/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/local/lib/python3.9/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/usr/local/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/local/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/local/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/lib/python3.9/copy.py", line 161, in deepcopy
rv = reductor(4)
TypeError: cannot pickle '_thread.lock' object
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 32 (9 by maintainers)
Thanks folks. This is tagged for the next patch release 2022.6.1
I’ll have a look.
Confirmed this version fixed the issue for me.
Workaround: copy back the old
calendar.pyfrom here tohomeassistant/components/caldav/and restart homeassistant. Seems to work.I upgraded to caldav 0.9, I don’t have the Assertion error anymore, but still the original:
That one is “mine” (from the python caldav library), I’ll have a look