Last.fm integration errors
See original GitHub issueThe problem
I get a lot of errors regarding the last.fm integration in the log and it’s often slow to update.
Environment
- Home Assistant Core release with the issue: 0.112.2
- Last working Home Assistant Core release (if known): Unknown. It’s been like this as long as I’ve used it. At least 10 months.
- Operating environment (OS/Container/Supervised/Core): Supervised
- Integration causing this issue: Last.fm
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/lastfm/
Problem-relevant configuration.yaml
# Last.fm
sensor:
- platform: lastfm
api_key: !secret last_fm_api_key
users:
- tigattack
- various
- other
- users
Traceback/Error logs
Logger: homeassistant.helpers.entity
Source: components/lastfm/sensor.py:90
First occurred: 7 July 2020, 18:36:51 (163 occurrences)
Last logged: 7 July 2020, 19:04:36
Update for sensor.lastfm_tigattack fails
Update for sensor.various fails
Update for sensor.other fails
Update for sensor.users fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
self.update # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/lastfm/sensor.py", line 90, in update
recent_tracks = self._user.get_recent_tracks(limit=2)
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 2365, in get_recent_tracks
params,
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 2797, in _collect_nodes
raise e
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 2793, in _collect_nodes
doc = sender._request(method_name, cacheable, params)
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 1118, in _request
return _Request(self.network, method_name, params).execute(cacheable)
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 951, in execute
response = self._download_response()
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 940, in _download_response
self._check_response_for_errors(response_text)
File "/usr/local/lib/python3.7/site-packages/pylast/__init__.py", line 970, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Operation failed - Most likely the backend service failed. Please try again.
Additional information
There are a lot of similar but slightly differing errors around the lastfm integration. The above is the most common. Please let me know if you’d like tracebacks from all of the other errors.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:16
Top Results From Across the Web
Error Codes - API Docs | Last.fm
List of errors. 1 : This error does not exist; 2 : Invalid service -This service does not exist; 3 : Invalid Method...
Read more >scrobble error : r/lastfm - Reddit
go to spotify-> settings-> apps and remove last.fm, then go to last fm and connect your spotify again. it worked for me and...
Read more >Last.fm Status (@lastfmstatus) / Twitter
The team are currently investigating the 503 errors on the site. We apologise for any inconvenience caused in the meantime. 52. 42. 294....
Read more >Last.fm down? Current status and problems - Downdetector
Last.fm is a music streaming service that selects songs based on the user's musical tast by recording details of the tracks the user...
Read more >Scrobble tracks properly to/Improvements to Last.fm integration
Another pet peeve: please fix the missing ampersand symbol in artist and track names of your scrobbles, it still creates wrong entries in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suspect the Last.fm API is just quite unreliable. I’ve witnessed this in other projects too. It would be nice if the code owner could make the integration handle these issues a bit better though, so our logs aren’t spammed with LFM errors.
Thanks for being so persistent with this. I also get a lot of instability with this. Most recently the integration completely failed to load after restart with the following error:
pylast.MalformedResponseError: Malformed response from Last.fm. Underlying error: Connection to the API failed with HTTP code 504