hassio-addons / addon-unifi

UniFi Network Application - Home Assistant Community Add-ons
https://addons.community
MIT License
279 stars 138 forks source link

Unable to add Unifi Addon - Cannot serialize non-str key #300

Closed leonfortej closed 3 years ago

leonfortej commented 3 years ago

Problem/Motivation

Attempting to add the unifi integration, always errors out when trying to add the integration

Expected behavior

Integration to be added successfully

Actual behavior

Logger: aiohttp.server Source: components/unifi/controller.py:493 First occurred: 5:32:10 PM (1 occurrences) Last logged: 5:32:10 PM

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, 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 92, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, 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 157, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 198, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 256, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 93, in async_step_user controller = await get_controller( File "/usr/src/homeassistant/homeassistant/components/unifi/controller.py", line 493, in get_controller await controller.login() File "/usr/local/lib/python3.9/site-packages/aiounifi/controller.py", line 110, in login await self._request("post", url=url, json=auth) File "/usr/local/lib/python3.9/site-packages/aiounifi/controller.py", line 290, in _request async with self.session.request( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in aenter self._resp = await self._coro File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 542, in _request resp = await req.send(conn) File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 668, in send await writer.write_headers(status_line, self.headers) File "/usr/local/lib/python3.9/site-packages/aiohttp/http_writer.py", line 118, in write_headers buf = _serialize_headers(status_line, headers) File "aiohttp/_http_writer.pyx", line 137, in aiohttp._http_writer._serialize_headers File "aiohttp/_http_writer.pyx", line 109, in aiohttp._http_writer.to_str TypeError: Cannot serialize non-str key None

Steps to reproduce

Just walking through adding the integration on hassio (Core & Docker versions)

Proposed changes

Not a clue.

sinclairpaul commented 3 years ago

This is the repo for the controller addon, and it looks like you have an issue with the Home Assistant Integration.

I would suggest seeking help on the HA Discord or Forums, there isn't much we can do here, sorry.