zha-toolkit
zha-toolkit copied to clipboard
Error during setup of component zha_toolkit with v1.1.14 upgrade
Upon upgrading to v1.1.14, I immediately received the following error:
Error during setup of component zha_toolkit
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/config/custom_components/zha_toolkit/__init__.py", line 660, in async_setup
await hass.async_add_executor_job(register_services, hass)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/zha_toolkit/__init__.py", line 853, in register_services
hass.services.async_register(
File "/usr/src/homeassistant/homeassistant/core.py", line 2515, in async_register
self._hass.verify_event_loop_thread("hass.services.async_register")
File "/usr/src/homeassistant/homeassistant/core.py", line 463, in verify_event_loop_thread
frame.report_non_thread_safe_operation(what)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'zha_toolkit' calls hass.services.async_register from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#hassservicesasync_register at custom_components/zha_toolkit/__init__.py, line 853: hass.services.async_register(. Please report it to the author of the 'zha_toolkit' custom integration.
Same here. Frustrating. Reverting the change here fixed it for me. Looks like too many levels of async ;-).
Just the single change, nothing else needed.
Same for me:
Logger: homeassistant.setup
Quelle: setup.py:404
Erstmals aufgetreten: 04:03:41 (1 Vorkommnisse)
Zuletzt protokolliert: 04:03:41
Error during setup of component zha_toolkit
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/config/custom_components/zha_toolkit/__init__.py", line 660, in async_setup
await hass.async_add_executor_job(register_services, hass)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/zha_toolkit/__init__.py", line 853, in register_services
hass.services.async_register(
File "/usr/src/homeassistant/homeassistant/core.py", line 2515, in async_register
self._hass.verify_event_loop_thread("hass.services.async_register")
File "/usr/src/homeassistant/homeassistant/core.py", line 463, in verify_event_loop_thread
frame.report_non_thread_safe_operation(what)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'zha_toolkit' calls hass.services.async_register from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#hassservicesasync_register at custom_components/zha_toolkit/__init__.py, line 853: hass.services.async_register(. Please report it to the author of the 'zha_toolkit' custom integration.
Same here. Frustrating. Reverting the change here fixed it for me. Looks like too many levels of
async;-).Just the single change, nothing else needed.
Reverting did not fix it for me. :-(
same problem for me
same here
Same here
Same here. Frustrating. Reverting the change here fixed it for me. Looks like too many levels of
async;-).Just the single change, nothing else needed.
Reverting did not fix it for me. :-(
You have to revert to 1.1.12
Same error with 1.1.4 version. Back to 1.1.3 is OK. I'm using HA 2024.6.4.
#241
How do you guys reverting versions? Selecting versions at "redownload" show me the older ones, but unable to change from the current
How do you guys reverting versions? Selecting versions at "redownload" show me the older ones, but unable to change from the current
I am able to just select the previous version and click the "download" button. The version number appears greyed out, which would make it seem like you can't select it, but you can.
You must wait a few seconds before clicking on donwload button ("Télécharger" in french).
Thanks - actually I can select any version I want, but when I click on them, it "jump back" to the current after a second, so I'm unable to redownload anything but 1.1.14 :/
EDIT: seems to be a general HACS issue unfortunately, have to wait for a new release of HACS ( if there is no workaround )
call this and your're good
call this and your're good
Indeed - thanks, it was a very useful tip!
Thanks - actually I can select any version I want, but when I click on them, it "jump back" to the current after a second, so I'm unable to redownload anything but 1.1.14 :/
EDIT: seems to be a general HACS issue unfortunately, have to wait for a new release of HACS ( if there is no workaround )
i had the same. just click on 1.1.13, it will jump back to 1.1.14 but if you click download it will work for 1,1.13
I've refactored some code - hopefully that's fine by the HomeAssistant team's rules. It start fine for me on 2024.07.4 v1.1.15 is released
I've refactored some code - hopefully that's fine by the HomeAssistant team's rules. It start fine for me on 2024.07.4 v1.1.15 is released
Still fails for me. I'm thinking the requirements is a bit malformed (>=>):
Setup failed for custom integration 'zha_toolkit': Requirements for zha_toolkit not found: ['pytz>=>2016.10'].
Enregistreur: homeassistant.setup
Source: setup.py:269
S'est produit pour la première fois: 00:37:20 (1 occurrences)
Dernier enregistrement: 00:37:20
Setup failed for custom integration 'zha_toolkit': Requirements for zha_toolkit not found: ['pytz>=>2016.10'].
same here
Right, I did not update using hacs and apparently this is not checked in the ci action - I am updating that.
Updated in v1.1.16
works for me now...thanks for the quick fix
I have no longer zha_toolkit actions/services available now it seems.
I will revert back to v1.1.12 in the meantime to see if all is back to normal ^^
edit: v1.1.12 is no longer working with HA 2024.8.
So I'm stuck now ;D
I don't think v1.1.16 completely fixes it. Actions are still not showing up in 2024.8
2024-08-08 10:01:20.666 DEBUG (MainThread) [custom_components.zha_toolkit] DEFAULT_OTAU = /config/zigpy_ota
2024-08-08 10:01:20.666 DEBUG (MainThread) [custom_components.zha_toolkit] Setup services from async_setup
2024-08-08 10:01:20.676 WARNING (MainThread) [py.warnings] /config/custom_components/zha_toolkit/__init__.py:660: RuntimeWarning: coroutine 'register_services' was never awaited
register_services(hass)
zha_toolkit.attr_read works only in 1.1.13 on HA 2024.8... UPD: It doesn't. When running the action I'm getting: Error running action Unknown error
I think several of the (distinct) issues listed in this thread may have been resolved in one of the releases leading up to the beta 1.1.19 which was released today. Want to give that a shot and report back?
I think several of the (distinct) issues listed in this thread may have been resolved in one of the releases leading up to the beta 1.1.19 which was released today. Want to give that a shot and report back?
I tested v1.1.19 and attr_write is working fine now.
thank you @wbyoung and @mdeweerd
1.1.19 is working for me as well.
Thank you for the feedback. I am closing this issue.
