Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing dependency on aiofiles #1022

Open
RustyDust opened this issue Dec 5, 2024 · 0 comments
Open

missing dependency on aiofiles #1022

RustyDust opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@RustyDust
Copy link

After upgrading to HA 2014.12.0 camera streams were working fine for me, however after upgrading to Python 3.13.1 I got this in the logs:

Dec 05 19:08:33 sru-pi hass[3038731]: Traceback (most recent call last):
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/opt/homeassistant/lib/python3.13/site-packages/homeassistant/setup.py", line 334, in _async_setup_component
Dec 05 19:08:33 sru-pi hass[3038731]:     component = await integration.async_get_component()
Dec 05 19:08:33 sru-pi hass[3038731]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/opt/homeassistant/lib/python3.13/site-packages/homeassistant/loader.py", line 1034, in async_get_component
Dec 05 19:08:33 sru-pi hass[3038731]:     self._component_future.result()
Dec 05 19:08:33 sru-pi hass[3038731]:     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/opt/homeassistant/lib/python3.13/site-packages/homeassistant/loader.py", line 1014, in async_get_component
Dec 05 19:08:33 sru-pi hass[3038731]:     comp = await self.hass.async_add_import_executor_job(
Dec 05 19:08:33 sru-pi hass[3038731]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 05 19:08:33 sru-pi hass[3038731]:         self._get_component, True
Dec 05 19:08:33 sru-pi hass[3038731]:         ^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 05 19:08:33 sru-pi hass[3038731]:     )
Dec 05 19:08:33 sru-pi hass[3038731]:     ^
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
Dec 05 19:08:33 sru-pi hass[3038731]:     result = self.fn(*self.args, **self.kwargs)
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/opt/homeassistant/lib/python3.13/site-packages/homeassistant/loader.py", line 1074, in _get_component
Dec 05 19:08:33 sru-pi hass[3038731]:     ComponentProtocol, importlib.import_module(self.pkg_path)
Dec 05 19:08:33 sru-pi hass[3038731]:                        ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/opt/homeassistant/lib/python3.13/site-packages/homeassistant/util/loop.py", line 200, in protected_loop_func
Dec 05 19:08:33 sru-pi hass[3038731]:     return func(*args, **kwargs)
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
Dec 05 19:08:33 sru-pi hass[3038731]:     return _bootstrap._gcd_import(name[level:], package, level)
Dec 05 19:08:33 sru-pi hass[3038731]:            ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 05 19:08:33 sru-pi hass[3038731]:   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
Dec 05 19:08:33 sru-pi hass[3038731]:   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
Dec 05 19:08:33 sru-pi hass[3038731]:   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
Dec 05 19:08:33 sru-pi hass[3038731]:   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
Dec 05 19:08:33 sru-pi hass[3038731]:   File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
Dec 05 19:08:33 sru-pi hass[3038731]:   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/home/homeassistant/.homeassistant/custom_components/aarlo/__init__.py", line 53, in <module>
Dec 05 19:08:33 sru-pi hass[3038731]:     from .cfg import BlendedCfg, PyaarloCfg
Dec 05 19:08:33 sru-pi hass[3038731]:   File "/home/homeassistant/.homeassistant/custom_components/aarlo/cfg.py", line 17, in <module>
Dec 05 19:08:33 sru-pi hass[3038731]:     import aiofiles
Dec 05 19:08:33 sru-pi hass[3038731]: ModuleNotFoundError: No module named 'aiofiles'

Best guess is that aiofiles was formerly required by HA itself and thus automatically available to aarlo. After manually installing the aiofiles module in my vent everything is working fine again.
So maybe add aiofiles to the requirements of aarlo.

@twrecked twrecked self-assigned this Dec 5, 2024
@twrecked twrecked added the bug Something isn't working label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants