YouTube Music Playlists don't show up
See original GitHub issueWhat version of Music Assistant has the issue?
2022.7.b5
The problem
When I navigate to the playlists section under youtube music, the playlists never load, it shows the loading bar forever and I get the following error in the logs:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/config/custom_components/mass/websockets.py", line 106, in async_get_mass_func
await orig_func(hass, connection, msg, mass)
File "/config/custom_components/mass/websockets.py", line 856, in websocket_browse
result = await mass.music.browse(msg.get(URI))
File "/usr/local/lib/python3.10/site-packages/music_assistant/controllers/music/__init__.py", line 209, in browse
return await prov.browse(path)
File "/usr/local/lib/python3.10/site-packages/music_assistant/models/music_provider.py", line 273, in browse
return [x async for x in self.get_library_playlists()]
File "/usr/local/lib/python3.10/site-packages/music_assistant/models/music_provider.py", line 273, in
return [x async for x in self.get_library_playlists()]
File "/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/ytmusic/ytmusic.py", line 134, in get_library_playlists
playlists_obj = await get_library_playlists(headers=self._headers)
File "/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/ytmusic/helpers.py", line 125, in get_library_playlists
return await loop.run_in_executor(None, _get_library_playlists)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/ytmusic/helpers.py", line 117, in _get_library_playlists
playlists = ytm.get_library_playlists(limit=9999)
File "/usr/local/lib/python3.10/site-packages/ytmusicapi/mixins/library.py", line 32, in get_library_playlists
playlists = parse_content_list(results['items'][1:], parse_playlist)
File "/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/browsing.py", line 158, in parse_content_list
search_results.append(search_result)
File "/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/browsing.py", line 196, in parse_playlist
File "/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/utils.py", line 155, in nav
File "/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/utils.py", line 149, in nav
KeyError: 'runs'
How to reproduce
Navigate to the playlist section under youtube music
Relevant log output
2022-07-14 11:24:57 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140717956706512] Error handling message: Unknown error (unknown_error) Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py”, line 27, in _handle_async_response await func(hass, connection, msg) File “/config/custom_components/mass/websockets.py”, line 106, in async_get_mass_func await orig_func(hass, connection, msg, mass) File “/config/custom_components/mass/websockets.py”, line 856, in websocket_browse result = await mass.music.browse(msg.get(URI)) File “/usr/local/lib/python3.10/site-packages/music_assistant/controllers/music/init.py”, line 209, in browse return await prov.browse(path) File “/usr/local/lib/python3.10/site-packages/music_assistant/models/music_provider.py”, line 273, in browse return [x async for x in self.get_library_playlists()] File “/usr/local/lib/python3.10/site-packages/music_assistant/models/music_provider.py”, line 273, in return [x async for x in self.get_library_playlists()] File “/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/ytmusic/ytmusic.py”, line 134, in get_library_playlists playlists_obj = await get_library_playlists(headers=self._headers) File “/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/ytmusic/helpers.py”, line 125, in get_library_playlists return await loop.run_in_executor(None, _get_library_playlists) File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) File “/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/ytmusic/helpers.py”, line 117, in _get_library_playlists playlists = ytm.get_library_playlists(limit=9999) File “/usr/local/lib/python3.10/site-packages/ytmusicapi/mixins/library.py”, line 32, in get_library_playlists playlists = parse_content_list(results[‘items’][1:], parse_playlist) File “/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/browsing.py”, line 158, in parse_content_list search_results.append(search_result) File “/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/browsing.py”, line 196, in parse_playlist File “/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/utils.py”, line 155, in nav File “/usr/local/lib/python3.10/site-packages/ytmusicapi/parsers/utils.py”, line 149, in nav KeyError: ‘runs’
Additional information
No response
What version of Home Assistant Core are your running
2022.7.0
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Linux
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
That was it! There was an unnamed Playlist with 0 items. Once I deleted it, the Playlist started showing up. Thanks
Hey! No problem at all, we’re happy to help out. Could you please check the log to see if you encounter any errors that might shine some light on the problem?