blakeblackshear / frigate-hass-integration

Frigate integration for Home Assistant
MIT License
761 stars 121 forks source link

`v5.4.1` [preview release]: dependency not found #762

Open tbrasser opened 2 weeks ago

tbrasser commented 2 weeks ago

Version of the custom_component

5.4.1

Configuration


Add your logs here.

Describe the bug

A clear and concise description of what the bug is.

Debug log


Logger: homeassistant.setup
Bron: setup.py:269
Eerst voorgekomen: 09:52:17 (1 gebeurtenissen)
Laatst gelogd: 09:52:17

Setup failed for custom integration 'frigate': Requirements for frigate not found: ['hass-web-proxy-lib==0.0.6'].
Lukino2000 commented 2 weeks ago

for me, updating HA to 2024.11.0 resolves the issue

lezruk commented 2 weeks ago

I'm on 2024.11.0 docker image, Similar issue with 5.4.1 upgrade, in my case 'hass_web_proxy_lib' is not found at all

Setup failed for custom integration 'frigate': Unable to import component: No module named 'hass_web_proxy_lib'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1031, in async_get_component
    self._component_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1011, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/frigate/__init__.py", line 57, in <module>
    from .views import async_setup as views_async_setup
  File "/config/custom_components/frigate/views.py", line 11, in <module>
    from hass_web_proxy_lib import (
ModuleNotFoundError: No module named 'hass_web_proxy_lib'
dermotduffy commented 2 weeks ago

@lezruk I would expect that to be installed automatically. Have you tried downing / upping your HA instance?

lezruk commented 2 weeks ago

5.4.1 integration I updated once it popped up in HACS, HASS updated automatically, just today updated HASS to 2024.11.1 - same behaviour - 'hass_web_proxy_lib' load issue. Downgrading to 5.4.0 works fine though

dermotduffy commented 2 weeks ago

FYI: I just tested this by updating the Frigate integration via HACS to v5.4.1, upping/downing Home Assistant, and the library was automatically installed and the integration setup correctly without problem as expected. As such, for people experiencing this issue, I'm not sure what we're doing differently, perhaps try entirely down the docker container and up it again (for docker users).

rsteckler commented 2 weeks ago

HA was 2024.10.x Upgraded Frigate on HACS to 5.4.1 Restarted HA Saw the error and assumed I needed to update HA, so upgraded HA to 2024.11.1 Restarted HA Continued to have the error despite bouncing HA multiple times Finally downgraded Frigate on HACS to 5.4.0 and it's working again

dermotduffy commented 2 weeks ago

@rsteckler Are you using HA in a docker container, or HAOS? Is there anything in your HA log, shortly after startup, about trying to install the dependency (search for hass-web-proxy-lib).

rsteckler commented 2 weeks ago

I'm running in a kubernetes environment, but it's essentially docker.
And yes - sorry for the lack of specificity. When I said "the error" in my previous post, I meant the same error as the other posts (i.e. a failed dependency on hass-web-proxy-lib)

dermotduffy commented 2 weeks ago

I meant the same error as the other posts (i.e. a failed dependency on hass-web-proxy-lib)

Would you mind searching for hass-web-proxy-lib in your HA logfile and paste anything you find that references it?

rsteckler commented 2 weeks ago

Upgraded back to 5.4.1 and restarted. Here are the logs, including some other content that might be related.

Log ``` 2024-11-11 01:46:55.125 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration frigate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-11-11 01:47:03.141 WARNING (ImportExecutor_0) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one. 2024-11-11 01:47:18.551 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'frigate': Unable to import component: No module named 'hass_web_proxy_lib' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1031, in async_get_component self._component_future.result() File "/usr/src/homeassistant/homeassistant/loader.py", line 1011, in async_get_component comp = await self.hass.async_add_import_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/frigate/__init__.py", line 57, in from .views import async_setup as views_async_setup File "/config/custom_components/frigate/views.py", line 11, in from hass_web_proxy_lib import ( ModuleNotFoundError: No module named 'hass_web_proxy_lib' 2024-11-11 01:47:23.176 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/yarl/_parse.py", line 134, in split_netloc port = int(port_str) ^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'f119:cfe9:5d06:eaaa:cbff:fe33:c731:8002' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 517, in _request url = self._build_url(str_or_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 445, in _build_url url = URL(str_or_url) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 307, in __new__ return pre_encoded_url(val) if encoded else encode_url(val) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 154, in encode_url username, password, host, port = split_netloc(netloc) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/yarl/_parse.py", line 136, in split_netloc raise ValueError("Invalid URL: port can't be converted to integer") ValueError: Invalid URL: port can't be converted to integer The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 137, in _async_start await gather_with_limited_concurrency(FLOW_INIT_LIMIT, *init_coros) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 114, in gather_with_limited_concurrency return await gather( ^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/async_.py", line 112, in sem_task return await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1301, in async_init flow, result = await self._async_init(flow_id, handler, context, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1336, in _async_init result = await self._async_handle_step(flow, flow.init_step, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/samsungtv/config_flow.py", line 508, in async_step_zeroconf await self._async_set_device_unique_id() File "/usr/src/homeassistant/homeassistant/components/samsungtv/config_flow.py", line 153, in _async_set_device_unique_id if not await self._async_get_and_check_device_info(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/samsungtv/config_flow.py", line 221, in _async_get_and_check_device_info result, _method, info = await self._async_get_device_info_and_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/samsungtv/config_flow.py", line 210, in _async_get_device_info_and_method result, _, method, info = await async_get_device_info(self.hass, self._host) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 109, in async_get_device_info if info := await bridge.async_device_info(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 577, in async_device_info device_info: dict[str, Any] = await rest_api.rest_device_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/samsungtvws/async_rest.py", line 71, in rest_device_info return await self._rest_request("") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/samsungtvws/async_rest.py", line 62, in _rest_request async with future as resp: File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1359, in __aenter__ self._resp: _RetType = await self._coro ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 519, in _request raise InvalidUrlClientError(str_or_url) from e aiohttp.client_exceptions.InvalidUrlClientError: https://fdfb:f119:cfe9:5d06:eaaa:cbff:fe33:c731:8002/api/v2/ ```
dermotduffy commented 2 weeks ago

Thanks @rsteckler . Not really conclusive, still can't figure out why the package is not being installed for you. If you are comfortable doing so, would you mind logging in to your HA instance via ssh / docker exec and running:

pip install hass-web-proxy-lib==0.0.6

This is what Home Assistant should be running to install the dependency, I'm trying to figure out if there's some subset of users / scenarios in which that doesn't work ... or whether HA is just not trying to install it.

(Doesn't matter whether you're running 5.4.0 or 5.4.1 when you do this, I just want to see if it can be installed)

rsteckler commented 2 weeks ago

Sure - happy to help.

Upgraded again to 5.4.1. Verified the error exists in the logs still. Logged into the pod and here's the output:

Details ``` node-nuc-hassio:/config# pip install hass-web-proxy-lib==0.0.6 Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/ Collecting hass-web-proxy-lib==0.0.6 Downloading hass_web_proxy_lib-0.0.6-py3-none-any.whl.metadata (9.1 kB) Requirement already satisfied: homeassistant>=2024.10.3 in /usr/local/lib/python3.12/site-packages (from hass-web-proxy-lib==0.0.6) (2024.11.1) Requirement already satisfied: aiodns==3.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.2.0) Requirement already satisfied: aiohasupervisor==0.2.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.1) Requirement already satisfied: aiohttp==3.10.10 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.10.10) Requirement already satisfied: aiohttp-cors==0.7.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.7.0) Requirement already satisfied: aiohttp-fast-zlib==0.1.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.1) Requirement already satisfied: aiozoneinfo==0.2.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.1) Requirement already satisfied: astral==2.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.2) Requirement already satisfied: async-interrupt==1.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.2.0) Requirement already satisfied: attrs==24.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.2.0) Requirement already satisfied: atomicwrites-homeassistant==1.4.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.4.1) Requirement already satisfied: awesomeversion==24.6.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.6.0) Requirement already satisfied: bcrypt==4.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.2.0) Requirement already satisfied: certifi>=2021.5.30 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.8.30) Requirement already satisfied: ciso8601==2.3.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.3.1) Requirement already satisfied: fnv-hash-fast==1.0.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.2) Requirement already satisfied: hass-nabucasa==0.83.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.83.0) Requirement already satisfied: httpx==0.27.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.27.2) Requirement already satisfied: home-assistant-bluetooth==1.13.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.13.0) Requirement already satisfied: ifaddr==0.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.0) Requirement already satisfied: Jinja2==3.1.4 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.1.4) Requirement already satisfied: lru-dict==1.3.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3.0) Requirement already satisfied: PyJWT==2.9.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.9.0) Requirement already satisfied: cryptography==43.0.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (43.0.1) Requirement already satisfied: Pillow==10.4.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (10.4.0) Requirement already satisfied: propcache==0.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.0) Requirement already satisfied: pyOpenSSL==24.2.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.2.1) Requirement already satisfied: orjson==3.10.10 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.10.10) Requirement already satisfied: packaging>=23.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.2) Requirement already satisfied: psutil-home-assistant==0.0.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.0.1) Requirement already satisfied: python-slugify==8.0.4 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (8.0.4) Requirement already satisfied: PyYAML==6.0.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (6.0.2) Requirement already satisfied: requests==2.32.3 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.32.3) Requirement already satisfied: SQLAlchemy==2.0.31 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.0.31) Requirement already satisfied: typing-extensions<5.0,>=4.12.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.12.2) Requirement already satisfied: ulid-transform==1.0.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.2) Requirement already satisfied: urllib3<2,>=1.26.5 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.26.20) Requirement already satisfied: uv==0.4.28 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.4.28) Requirement already satisfied: voluptuous==0.15.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.15.2) Requirement already satisfied: voluptuous-serialize==2.6.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.6.0) Requirement already satisfied: voluptuous-openapi==0.0.5 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.0.5) Requirement already satisfied: yarl==1.17.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.17.1) Requirement already satisfied: webrtc-models==0.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.0) Requirement already satisfied: pycares>=4.0.0 in /usr/local/lib/python3.12/site-packages (from aiodns==3.2.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.4.0) Requirement already satisfied: mashumaro<4.0,>=3.11 in /usr/local/lib/python3.12/site-packages (from aiohasupervisor==0.2.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.14) Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.4.3) Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3.1) Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.5.0) Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (6.1.0) Requirement already satisfied: tzdata>=2024.1 in /usr/local/lib/python3.12/site-packages (from aiozoneinfo==0.2.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.2) Requirement already satisfied: pytz in /usr/local/lib/python3.12/site-packages (from astral==2.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.2) Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.12/site-packages (from cryptography==43.0.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.17.1) Requirement already satisfied: fnvhash<0.2.0,>=0.1.0 in /usr/local/lib/python3.12/site-packages (from fnv-hash-fast==1.0.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.0) Requirement already satisfied: acme==2.11.0 in /usr/local/lib/python3.12/site-packages (from hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.11.0) Requirement already satisfied: pycognito==2024.5.1 in /usr/local/lib/python3.12/site-packages (from hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.5.1) Requirement already satisfied: snitun==0.39.1 in /usr/local/lib/python3.12/site-packages (from hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.39.1) Requirement already satisfied: habluetooth>=3.0 in /usr/local/lib/python3.12/site-packages (from home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.6.0) Requirement already satisfied: anyio in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.6.2.post1) Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.5) Requirement already satisfied: idna in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.10) Requirement already satisfied: sniffio in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3.1) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/site-packages (from Jinja2==3.1.4->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.0.2) Requirement already satisfied: psutil in /usr/local/lib/python3.12/site-packages (from psutil-home-assistant==0.0.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (6.0.0) Requirement already satisfied: text-unidecode>=1.3 in /usr/local/lib/python3.12/site-packages (from python-slugify==8.0.4->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.12/site-packages (from requests==2.32.3->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.2.0) Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.12/site-packages (from SQLAlchemy==2.0.31->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.1.1) Requirement already satisfied: josepy>=1.13.0 in /usr/local/lib/python3.12/site-packages (from acme==2.11.0->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.14.0) Requirement already satisfied: pyrfc3339 in /usr/local/lib/python3.12/site-packages (from acme==2.11.0->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.0.1) Requirement already satisfied: setuptools>=41.6.0 in /usr/local/lib/python3.12/site-packages (from acme==2.11.0->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (70.1.0) Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.12/site-packages (from httpcore==1.*->httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.14.0) Requirement already satisfied: boto3>=1.10.49 in /usr/local/lib/python3.12/site-packages (from pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.34.131) Requirement already satisfied: envs>=1.3 in /usr/local/lib/python3.12/site-packages (from pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.4) Requirement already satisfied: async-timeout>=3.0.1 in /usr/local/lib/python3.12/site-packages (from snitun==0.39.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.0.3) Requirement already satisfied: pycparser in /usr/local/lib/python3.12/site-packages (from cffi>=1.12->cryptography==43.0.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.22) Requirement already satisfied: bleak>=0.21.1 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.22.3) Requirement already satisfied: bleak-retry-connector>=3.3.0 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.6.0) Requirement already satisfied: bluetooth-adapters>=0.16.1 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.20.0) Requirement already satisfied: bluetooth-auto-recovery>=1.2.3 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.4.2) Requirement already satisfied: bluetooth-data-tools>=1.16.0 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.20.0) Requirement already satisfied: dbus-fast<3,>=1.83.0 in /usr/local/lib/python3.12/site-packages (from bleak>=0.21.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.24.3) Requirement already satisfied: aiooui>=0.1.1 in /usr/local/lib/python3.12/site-packages (from bluetooth-adapters>=0.16.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.7) Requirement already satisfied: uart-devices>=0.1.0 in /usr/local/lib/python3.12/site-packages (from bluetooth-adapters>=0.16.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.0) Requirement already satisfied: usb-devices>=0.4.5 in /usr/local/lib/python3.12/site-packages (from bluetooth-adapters>=0.16.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.4.5) Requirement already satisfied: PyRIC>=0.1.6.3 in /usr/local/lib/python3.12/site-packages (from bluetooth-auto-recovery>=1.2.3->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.6.3) Requirement already satisfied: btsocket>=0.2.0 in /usr/local/lib/python3.12/site-packages (from bluetooth-auto-recovery>=1.2.3->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.3.0) Requirement already satisfied: botocore<1.35.0,>=1.34.131 in /usr/local/lib/python3.12/site-packages (from boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.34.131) Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/local/lib/python3.12/site-packages (from boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.1) Requirement already satisfied: s3transfer<0.11.0,>=0.10.0 in /usr/local/lib/python3.12/site-packages (from boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.10.3) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.12/site-packages (from botocore<1.35.0,>=1.34.131->boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.9.0.post0) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.12/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.35.0,>=1.34.131->boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.16.0) Downloading hass_web_proxy_lib-0.0.6-py3-none-any.whl (12 kB) Installing collected packages: hass-web-proxy-lib Successfully installed hass-web-proxy-lib-0.0.6 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. node-nuc-hassio:/config# ```

At that point the frigate integration was not loaded and didn't have a "reload" option in HA. I restarted HA and this time there's no error in the logs and the Frigate installation loaded successfully.

If you're unable to repro on your side and have any hypotheses on why it might be failing on some machines, I'm happy to remove the hass-web-proxy-lib package and tail some logs or something while HA is starting up. One would assume it's logging something, somewhere when it should attempt to run the pip install.

For now, appreciate having it upgraded. Thanks for the workaround!

dermotduffy commented 2 weeks ago

Thanks @rsteckler , that's really helpful. I have (currently) no idea why HA would not install the requirements. You have proven they work, but HA isn't trying to install them ...

lezruk commented 2 weeks ago

According to the faq HA installs dependencies in /config/deps (this is persistent volume for containerized setup) , and I can see it there, even if manually deleted it pulls it back upon container restart. By saying that, it looks like integration doesn't find/search module in /config/deps but instead in pip default location - /usr/local/lib/python3.12/site-packages. That explains why manual install with pip works. Unfortunately /usr/local/ won;t survive container restart and module needs to be located in /config/deps instead

home-assistant-69c7fc799b-g55dg:/config/deps# ls -la | grep web
drwxr-xr-x    3 root     root             5 Nov  8 17:41 hass_web_proxy_lib
drwxr-xr-x    2 root     root             8 Nov  8 17:41 hass_web_proxy_lib-0.0.6.dist-info
tbrasser commented 2 weeks ago

Yeah something is/was up with uv and path in core.

wipash commented 2 weeks ago

I'm hitting the same high level error, but with possibly different logs relating to psutil install failing because of gcc missing:

Logs ``` Unable to install package hass-web-proxy-lib==0.0.6: error: Failed to prepare distributions Caused by: Failed to download and build `psutil==6.1.0` Caused by: Build backend failed to build wheel through `build_wheel` (exit status: 1) [stdout] running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-312/psutil copying psutil/__init__.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_common.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_compat.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_psaix.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_psbsd.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_pslinux.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_psosx.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_psposix.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_pssunos.py -> build/lib.linux-x86_64-cpython-312/psutil copying psutil/_pswindows.py -> build/lib.linux-x86_64-cpython-312/psutil creating build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/__init__.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/__main__.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_process.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_process_all.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_system.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-cpython-312/psutil/tests copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-cpython-312/psutil/tests running build_ext building 'psutil._psutil_linux' extension creating build/temp.linux-x86_64-cpython-312/psutil creating build/temp.linux-x86_64-cpython-312/psutil/arch/linux gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=610 -DPy_LIMITED_API=0x03060000 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -DPSUTIL_LINUX=1 -I/tmp/.tmpNNZvkU/builds-v0/.tmpJkZRfQ/include -I/usr/local/include/python3.12 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-cpython-312/psutil/_psutil_common.o [stderr] warning: build_py: byte-compiling is disabled, skipping. psutil could not be installed from sources because gcc is not installed. Try running: sudo apk add gcc python3-dev musl-dev linux-headers error: command 'gcc' failed: No such file or directory ```

As with the previous comments, pip install hass-web-proxy-lib==0.0.6 runs successfully when shelled into the home assistant Kubernetes pod.

pip install logs ``` home-assistant-68bd565cdc-r5mjh:~$ pip install hass-web-proxy-lib==0.0.6 Defaulting to user installation because normal site-packages is not writeable Collecting hass-web-proxy-lib==0.0.6 Downloading hass_web_proxy_lib-0.0.6-py3-none-any.whl.metadata (9.1 kB) Requirement already satisfied: homeassistant>=2024.10.3 in /usr/local/lib/python3.12/site-packages (from hass-web-proxy-lib==0.0.6) (2024.11.1) Requirement already satisfied: aiodns==3.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.2.0) Requirement already satisfied: aiohasupervisor==0.2.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.1) Requirement already satisfied: aiohttp==3.10.10 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.10.10) Requirement already satisfied: aiohttp-cors==0.7.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.7.0) Requirement already satisfied: aiohttp-fast-zlib==0.1.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.1) Requirement already satisfied: aiozoneinfo==0.2.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.1) Requirement already satisfied: astral==2.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.2) Requirement already satisfied: async-interrupt==1.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.2.0) Requirement already satisfied: attrs==24.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.2.0) Requirement already satisfied: atomicwrites-homeassistant==1.4.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.4.1) Requirement already satisfied: awesomeversion==24.6.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.6.0) Requirement already satisfied: bcrypt==4.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.2.0) Requirement already satisfied: certifi>=2021.5.30 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.8.30) Requirement already satisfied: ciso8601==2.3.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.3.1) Requirement already satisfied: fnv-hash-fast==1.0.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.2) Requirement already satisfied: hass-nabucasa==0.83.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.83.0) Requirement already satisfied: httpx==0.27.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.27.2) Requirement already satisfied: home-assistant-bluetooth==1.13.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.13.0) Requirement already satisfied: ifaddr==0.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.0) Requirement already satisfied: Jinja2==3.1.4 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.1.4) Requirement already satisfied: lru-dict==1.3.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3.0) Requirement already satisfied: PyJWT==2.9.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.9.0) Requirement already satisfied: cryptography==43.0.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (43.0.1) Requirement already satisfied: Pillow==10.4.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (10.4.0) Requirement already satisfied: propcache==0.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.0) Requirement already satisfied: pyOpenSSL==24.2.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.2.1) Requirement already satisfied: orjson==3.10.10 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.10.10) Requirement already satisfied: packaging>=23.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (24.2) Requirement already satisfied: psutil-home-assistant==0.0.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.0.1) Requirement already satisfied: python-slugify==8.0.4 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (8.0.4) Requirement already satisfied: PyYAML==6.0.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (6.0.2) Requirement already satisfied: requests==2.32.3 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.32.3) Requirement already satisfied: SQLAlchemy==2.0.31 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.0.31) Requirement already satisfied: typing-extensions<5.0,>=4.12.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.12.2) Requirement already satisfied: ulid-transform==1.0.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.2) Requirement already satisfied: urllib3<2,>=1.26.5 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.26.20) Requirement already satisfied: uv==0.4.28 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.4.28) Requirement already satisfied: voluptuous==0.15.2 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.15.2) Requirement already satisfied: voluptuous-serialize==2.6.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.6.0) Requirement already satisfied: voluptuous-openapi==0.0.5 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.0.5) Requirement already satisfied: yarl==1.17.1 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.17.1) Requirement already satisfied: webrtc-models==0.2.0 in /usr/local/lib/python3.12/site-packages (from homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.2.0) Requirement already satisfied: pycares>=4.0.0 in /usr/local/lib/python3.12/site-packages (from aiodns==3.2.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.4.0) Requirement already satisfied: mashumaro<4.0,>=3.11 in /usr/local/lib/python3.12/site-packages (from aiohasupervisor==0.2.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.14) Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.4.3) Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3.1) Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.5.0) Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.12/site-packages (from aiohttp==3.10.10->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (6.1.0) Requirement already satisfied: tzdata>=2024.1 in /usr/local/lib/python3.12/site-packages (from aiozoneinfo==0.2.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.2) Requirement already satisfied: pytz in /usr/local/lib/python3.12/site-packages (from astral==2.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.2) Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.12/site-packages (from cryptography==43.0.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.17.1) Requirement already satisfied: fnvhash<0.2.0,>=0.1.0 in /usr/local/lib/python3.12/site-packages (from fnv-hash-fast==1.0.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.0) Requirement already satisfied: acme==2.11.0 in /usr/local/lib/python3.12/site-packages (from hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.11.0) Requirement already satisfied: pycognito==2024.5.1 in /usr/local/lib/python3.12/site-packages (from hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2024.5.1) Requirement already satisfied: snitun==0.39.1 in /usr/local/lib/python3.12/site-packages (from hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.39.1) Requirement already satisfied: habluetooth>=3.0 in /usr/local/lib/python3.12/site-packages (from home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.6.0) Requirement already satisfied: anyio in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.6.2.post1) Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.5) Requirement already satisfied: idna in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.10) Requirement already satisfied: sniffio in /usr/local/lib/python3.12/site-packages (from httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3.1) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/site-packages (from Jinja2==3.1.4->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.0.2) Requirement already satisfied: psutil in /usr/local/lib/python3.12/site-packages (from psutil-home-assistant==0.0.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (6.0.0) Requirement already satisfied: text-unidecode>=1.3 in /usr/local/lib/python3.12/site-packages (from python-slugify==8.0.4->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.3) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.12/site-packages (from requests==2.32.3->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.2.0) Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.12/site-packages (from SQLAlchemy==2.0.31->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.1.1) Requirement already satisfied: josepy>=1.13.0 in /usr/local/lib/python3.12/site-packages (from acme==2.11.0->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.14.0) Requirement already satisfied: pyrfc3339 in /usr/local/lib/python3.12/site-packages (from acme==2.11.0->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.0.1) Requirement already satisfied: setuptools>=41.6.0 in /usr/local/lib/python3.12/site-packages (from acme==2.11.0->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (75.3.0) Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.12/site-packages (from httpcore==1.*->httpx==0.27.2->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.14.0) Requirement already satisfied: boto3>=1.10.49 in /usr/local/lib/python3.12/site-packages (from pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.34.131) Requirement already satisfied: envs>=1.3 in /usr/local/lib/python3.12/site-packages (from pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.4) Requirement already satisfied: async-timeout>=3.0.1 in /usr/local/lib/python3.12/site-packages (from snitun==0.39.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (4.0.3) Requirement already satisfied: pycparser in /usr/local/lib/python3.12/site-packages (from cffi>=1.12->cryptography==43.0.1->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.22) Requirement already satisfied: bleak>=0.21.1 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.22.3) Requirement already satisfied: bleak-retry-connector>=3.3.0 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (3.6.0) Requirement already satisfied: bluetooth-adapters>=0.16.1 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.20.0) Requirement already satisfied: bluetooth-auto-recovery>=1.2.3 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.4.2) Requirement already satisfied: bluetooth-data-tools>=1.16.0 in /usr/local/lib/python3.12/site-packages (from habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.20.0) Requirement already satisfied: dbus-fast<3,>=1.83.0 in /usr/local/lib/python3.12/site-packages (from bleak>=0.21.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.24.3) Requirement already satisfied: aiooui>=0.1.1 in /usr/local/lib/python3.12/site-packages (from bluetooth-adapters>=0.16.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.7) Requirement already satisfied: uart-devices>=0.1.0 in /usr/local/lib/python3.12/site-packages (from bluetooth-adapters>=0.16.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.0) Requirement already satisfied: usb-devices>=0.4.5 in /usr/local/lib/python3.12/site-packages (from bluetooth-adapters>=0.16.1->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.4.5) Requirement already satisfied: PyRIC>=0.1.6.3 in /usr/local/lib/python3.12/site-packages (from bluetooth-auto-recovery>=1.2.3->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.1.6.3) Requirement already satisfied: btsocket>=0.2.0 in /usr/local/lib/python3.12/site-packages (from bluetooth-auto-recovery>=1.2.3->habluetooth>=3.0->home-assistant-bluetooth==1.13.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.3.0) Requirement already satisfied: botocore<1.35.0,>=1.34.131 in /usr/local/lib/python3.12/site-packages (from boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.34.131) Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/local/lib/python3.12/site-packages (from boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.0.1) Requirement already satisfied: s3transfer<0.11.0,>=0.10.0 in /usr/local/lib/python3.12/site-packages (from boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (0.10.3) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.12/site-packages (from botocore<1.35.0,>=1.34.131->boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (2.9.0.post0) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.12/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.35.0,>=1.34.131->boto3>=1.10.49->pycognito==2024.5.1->hass-nabucasa==0.83.0->homeassistant>=2024.10.3->hass-web-proxy-lib==0.0.6) (1.16.0) Downloading hass_web_proxy_lib-0.0.6-py3-none-any.whl (12 kB) Installing collected packages: hass-web-proxy-lib Successfully installed hass-web-proxy-lib-0.0.6 ```
dermotduffy commented 2 weeks ago

By saying that, it looks like integration doesn't find/search module in /config/deps but instead in pip default location - /usr/local/lib/python3.12/site-packages.

The integration does not control (nor should set) the module search path, Home Assistant does and this is supposed to "just work" (and does for me, both in a test install and in the devcontainer).

A few ideas:

Unfortunately /usr/local/ won;t survive container restart and module needs to be located in /config/deps instead

I strongly suspect this depends on the install type. Using the official Home Assistant docker image, /usr/local will absolutely survive container restart (this is where Home Assistant installs its dependencies including this one, and /config/deps is not used).

rsteckler commented 2 weeks ago

I'm not a python dev and don't know the HA system well, so this might not be well-informed, but....

Responding to your hypothesis on python version:

Python 3.12.4 (main, Jun 22 2024, 12:49:21) [GCC 13.2.1 20240309] on linux

Also, pip show looks similar between a package installed by another HACS component:

node-nuc-hassio:/config# pip show xiaomi-ble
Name: xiaomi-ble
Version: 0.33.0
Summary: Manage Xiaomi BLE devices
Home-page: https://github.com/bluetooth-devices/xiaomi-ble
Author: John Carr
Author-email: john.carr@unrouted.co.uk
License: Apache-2.0
Location: /usr/local/lib/python3.12/site-packages
Requires: aiohttp, bleak, bleak-retry-connector, bluetooth-data-tools, bluetooth-sensor-state-data, cryptography, home-assistant-bluetooth, orjson, pycryptodomex, sensor-state-data
Required-by: 

and...

node-nuc-hassio:/config# pip show hass-web-proxy-lib
Name: hass-web-proxy-lib
Version: 0.0.6
Summary: A library to proxy web traffic through Home Assistant integrations.
Home-page: https://github.com/dermotduffy/hass-web-proxy-lib
Author: Dermot Duffy
Author-email: dermot.duffy@gmail.com
License: MIT
Location: /usr/local/lib/python3.12/site-packages
Requires: homeassistant
Required-by: 

Also:

node-nuc-hassio:/config# whoami
root

I know none of these really helps towards a solution, but lmk if you need anything from a broken system.

rsteckler commented 2 weeks ago

One more interesting thing (at least to me, who has no idea what I'm doing)

It looks like HA is trying to install the package, specifically into /config/deps

node-nuc-hassio:/config# grep "homeassistant.util.package" home-assistant.log
2024-11-12 05:17:03.609 INFO (SyncWorker_1) [homeassistant.util.package] Attempting install of hass-web-proxy-lib==0.0.6
2024-11-12 05:17:03.609 DEBUG (SyncWorker_1) [homeassistant.util.package] Running uv pip command: args=['/usr/local/bin/python3', '-m', 'uv', 'pip', 'install', '--quiet', 'hass-web-proxy-lib==0.0.6', '--index-strategy', 'unsafe-first-match', '--upgrade', '--constraint', '/usr/src/homeassistant/homeassistant/package_constraints.txt', '--target', '/config/deps']

When I run the command it runs, it audits 91 packages, seeing that hass-web-proxy-url is correctly installed in the /config/deps directory.

But it's not shown as 'installed' by pip:

node-nuc-hassio:/config# pip show hass-web-proxy-lib
WARNING: Package(s) not found: hass-web-proxy-lib

Here it is in the /config/deps directory:

node-nuc-hassio:/config# ls -al /config/deps/hass_web_proxy_lib*
/config/deps/hass_web_proxy_lib:
total 32
drwxr-xr-x    3 root     root          4096 Nov 10 05:49 .
drwxr-xr-x  227 root     root         12288 Nov 12 05:27 ..
-rw-r--r--    1 root     root         10523 Nov 10 05:49 __init__.py
-rw-r--r--    1 root     root             0 Nov 10 05:49 py.typed
drwxr-xr-x    2 root     root          4096 Nov 10 05:49 tests

/config/deps/hass_web_proxy_lib-0.0.6.dist-info:
total 44
drwxr-xr-x    2 root     root          4096 Nov 10 05:49 .
drwxr-xr-x  227 root     root         12288 Nov 12 05:27 ..
-rw-r--r--    1 root     root             2 Nov 10 05:49 INSTALLER
-rw-r--r--    1 root     root          1109 Nov 10 05:49 LICENSE
-rw-r--r--    1 root     root          9116 Nov 10 05:49 METADATA
-rw-r--r--    1 root     root          1076 Nov 10 05:49 RECORD
-rw-r--r--    1 root     root             0 Nov 10 05:49 REQUESTED
-rw-r--r--    1 root     root            88 Nov 10 05:49 WHEEL

In this scenario, HA fails to load the frigate integration but happily checks hass-web-proxy-lib is installed exactly where it wants it to be.

Running pip install hass-web-proxy-lib puts it in /usr/local, which allows it to be found by HA/Frigate at startup.

My guess, again knowing nothing about python, is that the frigate integration is trying to import the proxy library from the pip system path, rather than from /config/deps.

I'm also guessing it's working on your machine because you have it installed there, or your version of HA is using the system pip path instead of /config/deps.

Hope something in there helps.

dermotduffy commented 1 week ago

My guess, again knowing nothing about python, is that the frigate integration is trying to import the proxy library from the pip system path, rather than from /config/deps.

The Frigate integration does not control the search path for modules. It simply tells HA "Please install dependency X" and then tries to import it from the module path (that is also controlled by HA and/or the system configuration).

I suspect this is actually a Home Assistant issue, perhaps this one: https://github.com/home-assistant/core/issues/127966 . There's also a workaround linked you could try.

rsteckler commented 1 week ago

Good find. I agree that's exactly the problem and, as mentioned in the other thread, I'm running in a kunernetes environment.
It looks like there's a workaround in that thread for non-docker container environments that I'll use to verify.

rsteckler commented 1 week ago

Just confirming that the kubernetes solution in the other thread solves this. I would close this as an upstream issue and point people there.

awptechnologies commented 6 days ago

Unable to install package hass-web-proxy-lib==0.0.6: × No solution found when resolving dependencies: ╰─▶ Because homeassistant>=2024.10.3,<=2024.10.4 depends on yarl==1.13.1 and yarl==1.17.2, we can conclude that homeassistant>=2024.10.3,<=2024.10.4 cannot be used. And because only the following versions of homeassistant are available: homeassistant<=2024.10.4 homeassistant>=2024.11.0 we can conclude that homeassistant>=2024.10.3,<2024.11.0 cannot be used. (1) Because homeassistant>=2024.11.0 depends on webrtc-models==0.2.0 and webrtc-models==0.3.0, we can conclude that homeassistant>=2024.11.0 cannot be used. And because we know from (1) that homeassistant>=2024.10.3,<2024.11.0 cannot be used, we can conclude that homeassistant>=2024.10.3 cannot be used. And because hass-web-proxy-lib==0.0.6 depends on homeassistant>=2024.10.3 and you require hass-web-proxy-lib==0.0.6, we can conclude that your requirements are unsatisfiable. hint: Pre-releases are available for homeassistant in the requested range (e.g., 2024.11.0b9), but pre-releases weren't enabled (try: --prerelease=allow)

This is the error i get when looking through logs. I have tried the PYTONPATCH environment variable but it doesn't work i am on the dev version of homeassistant version: 2024.12.0.dev202411190233

dermotduffy commented 5 days ago

@awptechnologies Not sure, but guessing that because you're using an unreleased HomeAssistant version, there's not yet a HA library that's been released that matches the required dependencies. If this is right, you can just wait for the HA team to do a library release, or change to an official HA version (and not 2024.12.0.dev202411190233).

dermotduffy commented 4 days ago

@awptechnologies Rethinking this -- I think this library that hass-web-proxy-lib depends on should not be a runtime dependency at all, which would help with this case. I'll investigate this...

dermotduffy commented 1 day ago

@awptechnologies Can you try to latest v5.5.0 pre-release. I hope it will help your specific problem. (Won't change anything for anyone else who is impacted with the HA-wide import issue as discussed earlier in this thread)

awptechnologies commented 1 day ago

5.5.0 works great thanks.