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

Unknown Error occurred while setting up Integration #4

Open
scutler81 opened this issue Feb 28, 2023 · 2 comments
Open

Unknown Error occurred while setting up Integration #4

scutler81 opened this issue Feb 28, 2023 · 2 comments

Comments

@scutler81
Copy link

Getting "Unknown error occurred" when setting up the integration for the first time.

This is after entering my user name and password and selecting my service address.

@dcmeglio
Copy link
Owner

dcmeglio commented Mar 1, 2023

Can you share logs?

@scutler81
Copy link
Author

Hi @dcmeglio

This error originated from a custom integration.

Logger: custom_components.waste_management.config_flow
Source: custom_components/waste_management/config_flow.py:122
Integration: Waste Management (documentation, issues)
First occurred: 4:47:32 PM (2 occurrences)
Last logged: 6:01:26 PM

Unexpected exception Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/config/custom_components/waste_management/config_flow.py", line 122, in async_step_services
self.wmData.services = await self._wmclient.async_get_services(
File "/usr/local/lib/python3.10/site-packages/waste_management/client.py", line 154, in async_get_services
jsonData = await self.async_api_get(
File "/usr/local/lib/python3.10/site-packages/waste_management/client.py", line 271, in async_api_get
return json.loads(response.content.decode("UTF-8"))
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/waste_management/config_flow.py:128
Integration: Waste Management (documentation, issues)
First occurred: 4:47:32 PM (2 occurrences)
Last logged: 6:01:26 PM

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 94, 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/view.py", line 145, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
return await super().post(request, flow_id)
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 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 253, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/waste_management/config_flow.py", line 114, in async_step_accounts
return await self.async_step_services()
File "/config/custom_components/waste_management/config_flow.py", line 128, in async_step_services
self._services = {x.id: x.name for x in self.wmData.services}
TypeError: 'NoneType' object is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants