core icon indicating copy to clipboard operation
core copied to clipboard

docker container is not starting with commit 97d0d91d in dev-branch

Open berndj opened this issue 1 year ago • 1 comments

The problem

ha-core in docker container is not starting anymore with latest commit 97d0d91d. It starts again if the commit is removed i.e. 37cdc6d5

Error: ModuleNotFoundError: No module named 'aiohasupervisor'

What version of Home Assistant Core has the issue?

core-2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

97d0d91d

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

berndj avatar Sep 19 '24 07:09 berndj

https://github.com/home-assistant/core/pull/125926

Some local tests using diagnostics also fail

Traceback

2024-09-19 09:40:11.960 ERROR    MainThread aiohttp.server:web_protocol.py:433 Error handling request
Traceback (most recent call last):
  File "/Users/meti/Documents/Dev/home-assistant/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/venv/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/diagnostics/__init__.py", line 282, in get
    return await _async_get_json_file_response(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/diagnostics/__init__.py", line 194, in _async_get_json_file_response
    hass_sys_info = await async_get_system_info(hass)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/helpers/system_info.py", line 53, in async_get_system_info
    hassio = await async_import_module(hass, "homeassistant.components.hassio")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/helpers/importlib.py", line 60, in async_import_module
    import_future.result()
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/helpers/importlib.py", line 50, in async_import_module
    module = await hass.async_add_import_executor_job(_get_module, cache, name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/.pyenv/versions/3.12.1/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/helpers/importlib.py", line 26, in _get_module
    cache[name] = importlib.import_module(name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/meti/.pyenv/versions/3.12.1/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 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/hassio/__init__.py", line 50, in <module>
    from . import (  # noqa: F401
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/hassio/binary_sensor.py", line 17, in <module>
    from .entity import HassioAddonEntity
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/hassio/entity.py", line 24, in <module>
    from .coordinator import HassioDataUpdateCoordinator
  File "/Users/meti/Documents/Dev/home-assistant/homeassistant/components/hassio/coordinator.py", line 10, in <module>
    from aiohasupervisor import SupervisorError
ModuleNotFoundError: No module named 'aiohasupervisor'
2024-09-19 09:40:11.961 INFO     MainThread aiohttp.access:web_log.py:211 127.0.0.1 [19/Sep/2024:08:40:11 +0100] "GET /api/diagnostics/config_entry/01J84KJVRY1EQA4WVGBGZ21VD4 HTTP/1.1" 500 5213 "-" "Python/3.12 aiohttp/3.10.5"

farmio avatar Sep 19 '24 07:09 farmio

Is solved with commit #126225. Can be closed.

Sholofly avatar Sep 19 '24 15:09 Sholofly

Still reproducible with 9988c66d

berndj avatar Sep 19 '24 17:09 berndj

should be fixed with #126375, but without any error messages or logs, it is just a guess

mib1185 avatar Sep 21 '24 09:09 mib1185

Works fine now for my venv dev setup after script/setup. Don't know about container though.

farmio avatar Sep 21 '24 11:09 farmio

Tested with dev branch 9988c66d(Sep 19 17:30:54) with container environment

Steps

git checkout dev git pull script/setup start HA core task from Visual studio code

-> works!

berndj avatar Sep 21 '24 17:09 berndj

I also stumbled across this problem as I tried to set up an HA development environment for the first time last week, and happened to pull the version that was broken. Thanks to @berndj for the recipe to fix it, I was missing the "script/setup" part.

trevorwarwick avatar Sep 24 '24 12:09 trevorwarwick