home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.91k stars 30.14k forks source link

onvif integration setup - cannot import name 'AsyncBackend' #109097

Closed waclaw66 closed 4 months ago

waclaw66 commented 8 months ago

The problem

Following error occurs while setup of onvif integration...

led 30 07:16:33 server hass[3989342]: 2024-01-30 07:16:33.486 ERROR (MainThread) [aiohttp.server] Error handling request
led 30 07:16:33 server hass[3989342]: Traceback (most recent call last):
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 151, in get_asynclib
led 30 07:16:33 server hass[3989342]:     try:
led 30 07:16:33 server hass[3989342]:
led 30 07:16:33 server hass[3989342]: KeyError: 'anyio._backends._asyncio'
led 30 07:16:33 server hass[3989342]: During handling of the above exception, another exception occurred:
led 30 07:16:33 server hass[3989342]: Traceback (most recent call last):
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/onvif/config_flow.py", line 293, in async_setup_profiles
led 30 07:16:33 server hass[3989342]:     await device.update_xaddrs()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/onvif/client.py", line 400, in update_xaddrs
led 30 07:16:33 server hass[3989342]:     capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
led 30 07:16:33 server hass[3989342]:                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/zeep/proxy.py", line 64, in __call__
led 30 07:16:33 server hass[3989342]:     return await self._proxy._binding.send_async(
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
led 30 07:16:33 server hass[3989342]:     response = await client.transport.post_xml(
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/zeep/transports.py", line 235, in post_xml
led 30 07:16:33 server hass[3989342]:     response = await self.post(address, message, headers)
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/zeep/transports.py", line 220, in post
led 30 07:16:33 server hass[3989342]:     response = await self.client.post(
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1877, in post
led 30 07:16:33 server hass[3989342]:     return await self.request(
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1559, in request
led 30 07:16:33 server hass[3989342]:     return await self.send(request, auth=auth, follow_redirects=follow_redirects)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1646, in send
led 30 07:16:33 server hass[3989342]:     response = await self._send_handling_auth(
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1674, in _send_handling_auth
led 30 07:16:33 server hass[3989342]:     response = await self._send_handling_redirects(
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1711, in _send_handling_redirects
led 30 07:16:33 server hass[3989342]:     response = await self._send_single_request(request)
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1748, in _send_single_request
led 30 07:16:33 server hass[3989342]:     response = await transport.handle_async_request(request)
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 371, in handle_async_request
led 30 07:16:33 server hass[3989342]:     resp = await self._pool.handle_async_request(req)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 232, in handle_async_request
led 30 07:16:33 server hass[3989342]:     async with self._pool_lock:
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpcore/_synchronization.py", line 69, in __aenter__
led 30 07:16:33 server hass[3989342]:     await self._anyio_lock.acquire()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_core/_synchronization.py", line 122, in acquire
led 30 07:16:33 server hass[3989342]:     """Acquire the lock."""
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/lowlevel.py", line 45, in checkpoint_if_cancelled
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 153, in get_asynclib
led 30 07:16:33 server hass[3989342]:     except KeyError:
led 30 07:16:33 server hass[3989342]:                ^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
led 30 07:16:33 server hass[3989342]:     return _bootstrap._gcd_import(name[level:], package, level)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 76, in <module>
led 30 07:16:33 server hass[3989342]:     from ..abc import (
led 30 07:16:33 server hass[3989342]: ImportError: cannot import name 'AsyncBackend' from 'anyio.abc' (/opt/homeassistant/lib/python3.11/site-packages/anyio/abc/__init__.py)
led 30 07:16:33 server hass[3989342]: During handling of the above exception, another exception occurred:
led 30 07:16:33 server hass[3989342]: Traceback (most recent call last):
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 151, in get_asynclib
led 30 07:16:33 server hass[3989342]:     try:
led 30 07:16:33 server hass[3989342]:
led 30 07:16:33 server hass[3989342]: KeyError: 'anyio._backends._asyncio'
led 30 07:16:33 server hass[3989342]: During handling of the above exception, another exception occurred:
led 30 07:16:33 server hass[3989342]: Traceback (most recent call last):
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib64/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
led 30 07:16:33 server hass[3989342]:     resp = await request_handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib64/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
led 30 07:16:33 server hass[3989342]:     resp = await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib64/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl
led 30 07:16:33 server hass[3989342]:     return await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
led 30 07:16:33 server hass[3989342]:     return await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
led 30 07:16:33 server hass[3989342]:     return await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
led 30 07:16:33 server hass[3989342]:     return await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/ban.py", line 80, in ban_middleware
led 30 07:16:33 server hass[3989342]:     return await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/auth.py", line 233, in auth_middleware
led 30 07:16:33 server hass[3989342]:     return await handler(request)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/headers.py", line 31, in headers_middleware
led 30 07:16:33 server hass[3989342]:     response = await handler(request)
led 30 07:16:33 server hass[3989342]:                ^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/view.py", line 149, in handle
led 30 07:16:33 server hass[3989342]:     result = await handler(request, **request.match_info)
led 30 07:16:33 server hass[3989342]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/decorators.py", line 63, in with_admin
led 30 07:16:33 server hass[3989342]:     return await func(self, request, *args, **kwargs)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/config/config_entries.py", line 177, in post
led 30 07:16:33 server hass[3989342]:     return await super().post(request, flow_id)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/http/data_validator.py", line 72, in wrapper
led 30 07:16:33 server hass[3989342]:     result = await method(view, request, data, *args, **kwargs)
led 30 07:16:33 server hass[3989342]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/helpers/data_entry_flow.py", line 110, in post
led 30 07:16:33 server hass[3989342]:     result = await self._flow_mgr.async_configure(flow_id, data)
led 30 07:16:33 server hass[3989342]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/data_entry_flow.py", line 320, in async_configure
led 30 07:16:33 server hass[3989342]:     result = await self._async_handle_step(
led 30 07:16:33 server hass[3989342]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/data_entry_flow.py", line 416, in _async_handle_step
led 30 07:16:33 server hass[3989342]:     result: FlowResult = await getattr(flow, method)(user_input)
led 30 07:16:33 server hass[3989342]:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/onvif/config_flow.py", line 248, in async_step_configure
led 30 07:16:33 server hass[3989342]:     errors, description_placeholders = await self.async_setup_profiles()
led 30 07:16:33 server hass[3989342]:                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/homeassistant/components/onvif/config_flow.py", line 378, in async_setup_profiles
led 30 07:16:33 server hass[3989342]:     await device.close()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/onvif/client.py", line 498, in close
led 30 07:16:33 server hass[3989342]:     await self._snapshot_client.aclose()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 2003, in aclose
led 30 07:16:33 server hass[3989342]:     await self._transport.aclose()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 383, in aclose
led 30 07:16:33 server hass[3989342]:     await self._pool.aclose()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 322, in aclose
led 30 07:16:33 server hass[3989342]:     async with self._pool_lock:
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/httpcore/_synchronization.py", line 69, in __aenter__
led 30 07:16:33 server hass[3989342]:     await self._anyio_lock.acquire()
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_core/_synchronization.py", line 122, in acquire
led 30 07:16:33 server hass[3989342]:     """Acquire the lock."""
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/lowlevel.py", line 45, in checkpoint_if_cancelled
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 153, in get_asynclib
led 30 07:16:33 server hass[3989342]:     except KeyError:
led 30 07:16:33 server hass[3989342]:                ^^^^^^
led 30 07:16:33 server hass[3989342]:   File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
led 30 07:16:33 server hass[3989342]:     return _bootstrap._gcd_import(name[level:], package, level)
led 30 07:16:33 server hass[3989342]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
led 30 07:16:33 server hass[3989342]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
led 30 07:16:33 server hass[3989342]:   File "/opt/homeassistant/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 76, in <module>
led 30 07:16:33 server hass[3989342]:     from ..abc import (
led 30 07:16:33 server hass[3989342]: ImportError: cannot import name 'AsyncBackend' from 'anyio.abc' (/opt/homeassistant/lib/python3.11/site-packages/anyio/abc/__init__.py)

What version of Home Assistant Core has the issue?

core-2024.1.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

onvif

Link to integration documentation on our website

https://www.home-assistant.io/integrations/onvif/

Diagnostics information

Cannot enable diagnostic data since integration is not active yet.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 8 months ago

Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration (onvif) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `onvif` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign onvif` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


onvif documentation onvif source (message by IssueLinks)

tomskra commented 8 months ago

Same problem happened to me during activation of Philips_Js

https://www.home-assistant.io/integrations/philips_js/#features

Feb 05 07:44:55 dietpi Home Assistant[73872]: 2024-02-05 07:44:55.403 ERROR (MainThread) [homeassistant.components.philips_js] Unexpected exception
Feb 05 07:44:55 dietpi Home Assistant[73872]: Traceback (most recent call last):
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 151, in get_asynclib
Feb 05 07:44:55 dietpi Home Assistant[73872]:     try:
Feb 05 07:44:55 dietpi Home Assistant[73872]:          
Feb 05 07:44:55 dietpi Home Assistant[73872]: KeyError: 'anyio._backends._asyncio'
Feb 05 07:44:55 dietpi Home Assistant[73872]: During handling of the above exception, another exception occurred:
Feb 05 07:44:55 dietpi Home Assistant[73872]: Traceback (most recent call last):
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/home/homeassistant/.pyenv/versions/3.11.4/lib/python3.11/site-packages/homeassistant/components/philips_js/config_flow.py", line 163, in async_step_user
Feb 05 07:44:55 dietpi Home Assistant[73872]:     hub = await _validate_input(
Feb 05 07:44:55 dietpi Home Assistant[73872]:           ^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/home/homeassistant/.pyenv/versions/3.11.4/lib/python3.11/site-packages/homeassistant/components/philips_js/config_flow.py", line 57, in _validate_input
Feb 05 07:44:55 dietpi Home Assistant[73872]:     await hub.getSystem()
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/haphilipsjs/__init__.py", line 767, in getSystem
Feb 05 07:44:55 dietpi Home Assistant[73872]:     r = cast(Optional[SystemType], await self.getReq("system", protocol=prot))
Feb 05 07:44:55 dietpi Home Assistant[73872]:                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/haphilipsjs/__init__.py", line 568, in getReq
Feb 05 07:44:55 dietpi Home Assistant[73872]:     resp = await self.session.get(self._url(path, protocol = protocol))
Feb 05 07:44:55 dietpi Home Assistant[73872]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_client.py", line 1786, in get
Feb 05 07:44:55 dietpi Home Assistant[73872]:     return await self.request(
Feb 05 07:44:55 dietpi Home Assistant[73872]:            ^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_client.py", line 1559, in request
Feb 05 07:44:55 dietpi Home Assistant[73872]:     return await self.send(request, auth=auth, follow_redirects=follow_redirects)
Feb 05 07:44:55 dietpi Home Assistant[73872]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_client.py", line 1646, in send
Feb 05 07:44:55 dietpi Home Assistant[73872]:     response = await self._send_handling_auth(
Feb 05 07:44:55 dietpi Home Assistant[73872]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_client.py", line 1674, in _send_handling_auth
Feb 05 07:44:55 dietpi Home Assistant[73872]:     response = await self._send_handling_redirects(
Feb 05 07:44:55 dietpi Home Assistant[73872]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_client.py", line 1711, in _send_handling_redirects
Feb 05 07:44:55 dietpi Home Assistant[73872]:     response = await self._send_single_request(request)
Feb 05 07:44:55 dietpi Home Assistant[73872]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_client.py", line 1748, in _send_single_request
Feb 05 07:44:55 dietpi Home Assistant[73872]:     response = await transport.handle_async_request(request)
Feb 05 07:44:55 dietpi Home Assistant[73872]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpx/_transports/default.py", line 371, in handle_async_request
Feb 05 07:44:55 dietpi Home Assistant[73872]:     resp = await self._pool.handle_async_request(req)
Feb 05 07:44:55 dietpi Home Assistant[73872]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 232, in handle_async_request
Feb 05 07:44:55 dietpi Home Assistant[73872]:     async with self._pool_lock:
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/httpcore/_synchronization.py", line 69, in __aenter__
Feb 05 07:44:55 dietpi Home Assistant[73872]:     await self._anyio_lock.acquire()
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/anyio/_core/_synchronization.py", line 122, in acquire
Feb 05 07:44:55 dietpi Home Assistant[73872]:     """Acquire the lock."""
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/anyio/lowlevel.py", line 45, in checkpoint_if_cancelled
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 153, in get_asynclib
Feb 05 07:44:55 dietpi Home Assistant[73872]:     except KeyError:
Feb 05 07:44:55 dietpi Home Assistant[73872]:                ^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/home/homeassistant/.pyenv/versions/3.11.4/lib/python3.11/importlib/__init__.py", line 126, in import_module
Feb 05 07:44:55 dietpi Home Assistant[73872]:     return _bootstrap._gcd_import(name[level:], package, level)
Feb 05 07:44:55 dietpi Home Assistant[73872]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Feb 05 07:44:55 dietpi Home Assistant[73872]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 76, in <module>
Feb 05 07:44:55 dietpi Home Assistant[73872]:     from ..abc import (
Feb 05 07:44:55 dietpi Home Assistant[73872]: ImportError: cannot import name 'AsyncBackend' from 'anyio.abc' (/mnt/dietpi_userdata/homeassistant/deps/lib/python3.11/site-packages/anyio/abc/__init__.py)

@elupus - I'm tagging you as owner of philips_js

elupus commented 8 months ago

My guess is there is some custom component breaking httpx or anyio. What cystom components do you guys have installed.

tomskra commented 8 months ago

I have got these custom integrations:

and these custom components:

I also have installed these Lovelace components:

tomskra commented 8 months ago

I had one component (browser_mod) waiting for a restart. After the restart of HA, the initial config of Philips_Js went OK. Now, I have got enabled integration. Weird.

issue-triage-workflows[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.