core: Steam integration error "player_level" key not found
The problem
Since the last couple of weeks my steam online integration had stopped working, only showing me my own steam account status, but stopped showing 7 other friends accounts I had enabled tracking for.
there are 2 issues now:
-
If i add my own account and click configure, it fails with the following error error in config_flow
-
if I add a friends account ID with my API key, the configuration pop-up appears and displays all contacts in that ID’s friends list, but after selection does not show or update their statuses.
What version of Home Assistant Core has the issue?
2022.5.4
What was the last working version of Home Assistant Core?
2022.4.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Steam
Link to integration documentation on our website
https://www.home-assistant.io/integrations/steam_online
Diagnostics information
ISSUE 1;
Logger: aiohttp.server
Source: components/steam_online/config_flow.py:192
First occurred: 4:13:50 PM (4 occurrences)
Last logged: 4:25:30 PM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/steam/api.py", line 152, in download
req = urlopen(urlrequest(self._url, headers=head),
File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/local/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/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 79, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 243, in post
return await super().post(request)
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 70, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 205, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 232, 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 335, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/steam_online/config_flow.py", line 172, in async_step_init
for name in await self.hass.async_add_executor_job(self.get_accounts)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/steam_online/config_flow.py", line 192, in get_accounts
_users_str = [user["steamid"] for user in friends["friendslist"]["friends"]]
File "/usr/local/lib/python3.9/site-packages/steam/api.py", line 220, in __getitem__
return self.__handle_accessor("__getitem__", *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/steam/api.py", line 200, in __handle_accessor
self.call()
File "/usr/local/lib/python3.9/site-packages/steam/api.py", line 242, in call
data = self._downloader.download()
File "/usr/local/lib/python3.9/site-packages/steam/api.py", line 171, in download
raise HTTPError("Server connection failed: {0} ({1})".format(reason, code))
steam.api.HTTPError: Server connection failed: Unauthorized (401)
ISSUE 2
Logger: homeassistant.components.steam_online
Source: components/steam_online/coordinator.py:59
Integration: Steam (documentation, issues)
First occurred: 1:14:05 AM (562 occurrences)
Last logged: 4:22:00 PM
Unexpected error fetching steam_online data: 'player_level'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 191, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/components/steam_online/coordinator.py", line 65, in _async_update_data
return await self.hass.async_add_executor_job(self._update)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/steam_online/coordinator.py", line 59, in _update
players[k]["level"] = data["response"]["player_level"]
KeyError: 'player_level'
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 62 (16 by maintainers)
@home-assistant close