anotherjulien / MyHOME

MyHOME integration for Home-Assistant
GNU Affero General Public License v3.0
137 stars 57 forks source link

Failed to load configuration flow: 500 Internal Server Error Server got itself in trouble #63

Open marcog74 opened 2 years ago

marcog74 commented 2 years ago

hi, I have created a new server with the latest version of home assistant, Home Assistant 2022.10.5 Supervisor 2022.10.0 Operating System 9.2 Frontend 20221010.0 - latest, when adding a new integration, after selecting it in the drop-down menu, instead of switching to the gateway configuration, the error window appears with this writing: Cannot load the configuration flow: 500 Internal Server Error Server got itself in trouble, what am I doing wrong ?

andersfc commented 1 year ago

I have the same issue when installing the MyHOME integration (also I am on the latest version of Home Assistant).

This is the error message in the log: This error originated from a custom integration.

Logger: aiohttp.server Source: custom_components/myhome/config_flow.py:112 Integration: MyHOME (documentation, issues) First occurred: 09:16:42 (1 occurrences) Last logged: 09:16:42

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/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 60, 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 82, 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/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 148, in post return await super().post(request) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, 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/data_entry_flow.py", line 225, in async_init flow, result = await task File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in _async_init result = await self._async_handle_step(flow, flow.init_step, data, init_done) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/myhome/config_flow.py", line 109, in async_step_user local_gateways = [ File "/config/custom_components/myhome/config_flow.py", line 112, in if dr.format_mac(f'{MACAddress(user_input["serialNumber"])}') not in already_configured TypeError: 'NoneType' object is not subscriptable

toixop commented 1 year ago

Hello everyone! I have the same problem but with Home Assistant 2022.11.5 Supervisor 2022.11.2. It seems that something is wrong with the new integrations.

Any idea?

fkb77 commented 1 year ago

Hello, I experience the same issue with Home Assistant 2022.12.8 Supervisor 2022.12.1. Is there any workaround known for this issue?

prbtt commented 1 year ago

Hello, I experience the same issue with Home Assistant 2022.12.8 Supervisor 2022.12.1. Is there any workaround known for this issue?

I had the same issue, but after trying to add the integration and getting this error, my mh202 gateway was auto discovered. After clicking "configure", it asked for the gateway password, which it was already filled in with 12345. I click "ok" and got another error for "data@password must be of str value". So I decided to click configure again and retyping the password that was already filled in with 12345. This time I got no errors and the integration worked.