core: Repeating error of squeezebox media player component in 0.115
The problem
After update to 0.115 the HA log gets repeating error every 4-5 sec.
Environment
- Home Assistant Core release with the issue: 0.115.3
- Last working Home Assistant Core release (if known): 0.114
- Operating environment (OS/Container/Supervised/Core): Docker/Core
- Integration causing this issue: Squeezebox (?)
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/squeezebox/
Problem-relevant configuration.yaml
No yaml, since squezeebox integration works now via GUI setup.
Traceback/Error logs
2020-09-25 21:57:06 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 592, in _update_entity_states
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 806, in state_attributes
value = getattr(self, attr)
File "/usr/src/homeassistant/homeassistant/components/squeezebox/media_player.py", line 360, in media_duration
return self._player.duration
File "/usr/local/lib/python3.8/site-packages/pysqueezebox/player.py", line 105, in duration
if self.current_track and "duration" in self.current_track:
File "/usr/local/lib/python3.8/site-packages/pysqueezebox/player.py", line 165, in current_track
return self._status["playlist_loop"][self.current_index]
TypeError: 'NoneType' object is not subscriptable
Additional information
Media players more or less stay working even with this errors.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 47 (17 by maintainers)
There is a pending pull request to update squeezebox for media browser, which also bumps pysqueezebox to v5.0 and makes some changes to loading playlists. Can you check if you get the same error with those changes? https://github.com/home-assistant/core/pull/40642
I can confirm that modifying the manifest dependencies to the latest pysqueezebox library (0.5.0) does resolve the issue. I’m able to power-on and power-off, change volume with an empty playlist. The only thing that’s still broken is to load a playlist (but this could be due to my automation). It seems that the latest pysqueezebox changes things how to handle playlists, still figuring this out.
Thanks Martin for pointing me in the right direction.
Please keep the issue on topic. We don’t need to discuss what was said or not said.
In general, avoid pinging anyone unless they have already made it clear that they want to be pinged, eg by being code owner.
@rajlaud @frenck @MartinHjelmare
I’ve noticed y’all have made some commits lately. Can you have a look concerning this issue, or give us an update?