user2684 / imou_life

Home Assistant custom component for controlling Imou devices
MIT License
128 stars 21 forks source link

500 Internal Server Error Server got itself in trouble #83

Closed mezzaniin closed 10 months ago

mezzaniin commented 10 months ago

Getting an error while installing the Imou Life integration:

Bildschirmfoto 2023-12-30 um 13 55 38

Are they any solutions?

Here is my home-assistant.log

2023-12-30 12:46:19.938 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tapo 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 2023-12-30 12:46:19.940 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration localtuya 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 2023-12-30 12:46:19.942 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration imou_life 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 2023-12-30 12:46:19.943 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs 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 2023-12-30 12:46:19.944 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration config_editor 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 2023-12-30 12:47:01.801 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package imouapi==1.0.14: ERROR: Cannot install imouapi==1.0.14 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts 2023-12-30 12:47:10.652 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package imouapi==1.0.14: ERROR: Cannot install imouapi==1.0.14 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts 2023-12-30 12:47:18.454 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package imouapi==1.0.14: ERROR: Cannot install imouapi==1.0.14 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts 2023-12-30 12:47:18.455 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin return await func(self, request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 147, in post return await super().post(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post result = await self._flow_mgr.async_init( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 880, in async_init flow, result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 898, in _async_init flow = await self.async_create_flow(handler, context=context, data=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1000, in async_create_flow handler = await _async_get_flow_handler( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2096, in _async_get_flow_handler await _load_integration(hass, domain, hass_config) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2072, in _load_integration await async_process_deps_reqs(hass, hass_config, integration) File "/usr/src/homeassistant/homeassistant/setup.py", line 420, in async_process_deps_reqs await requirements.async_get_integration_with_requirements( File "/usr/src/homeassistant/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements return await manager.async_get_integration_with_requirements(domain) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/requirements.py", line 168, in async_get_integration_with_requirements await self._async_process_integration(integration, done) File "/usr/src/homeassistant/homeassistant/requirements.py", line 183, in _async_process_integration await self.async_process_requirements( File "/usr/src/homeassistant/homeassistant/requirements.py", line 248, in async_process_requirements await self._async_process_requirements(name, missing) File "/usr/src/homeassistant/homeassistant/requirements.py", line 286, in _async_process_requirements raise RequirementsNotFound(name, list(failures)) homeassistant.requirements.RequirementsNotFound: Requirements for imou_life not found: ['imouapi==1.0.14'].

user2684 commented 10 months ago

Hi, I did upgrade indeed some libraries in the latest 1.0.14 version so I'm afraid there is a conflict somewhere which did not show up in my tests. Which version of Home Assistant are you running? Thanks!

mezzaniin commented 10 months ago

Hi @user2684, im running an Home Assistant Core 2023.11.3.

user2684 commented 10 months ago

Ok so pretty recent version, I definitely need to reproduce this. Last few questions, are you using Home Assistant with its own Operating system or HA core installed on a OS you are maintaining? Any chance you can manually run from console pip install imouapi and report back the error message you are getting? So to understand which dependency is having conflicts. Thanks!

mezzaniin commented 10 months ago

Its an Docker Container with HA core. I dont get a error while installing the integration threw HACS but installing it under Settings -> Add Integrations is getting me the error.

user2684 commented 10 months ago

Ok, this is expected, HACS handle dependency management and install imouapi so either you install it with HACS or you manually install imouapi first with pip and then the integration. If instead you are doing something different let me know since with this new version there are already a couple of issues I need to fix. Thanks!

mezzaniin commented 10 months ago

I tryed it now threw pip install and got the same issue.. :/

user2684 commented 10 months ago

Ok,so related with #84. I'll try to reproduce the issue and report back. Meanwhile, installation via HACS should work fine right? Thanks

ZachH123 commented 10 months ago

Same problem here, reinstalling the app and updating HA's core has worked for me.

user2684 commented 10 months ago

Hello all, this has been fixed with 1.0.15 just released, please have a look and let me know if you have any issue.

Technically there was a dependency issue with sqlalchemy causing HACS to fail the installation of imouapi (/usr/local/bin/python -m pip install -e imouapi --upgrade --constraint /workspaces/homeassistant-202401/homeassistant/package_constraints.txt) Thanks