question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

YouTube Music Playlists don't show up

See original GitHub issue

What 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:closed
  • Created a year ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rjgrandycommented, Jul 26, 2022

That was it! There was an unnamed Playlist with 0 items. Once I deleted it, the Playlist started showing up. Thanks

0reactions
MarvinSchenkelcommented, Aug 8, 2022

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

YouTube playlists not showing up in search results? You are ...
YouTube developers said the issue where the playlists may not be showing up for some in search results is currently under investigation.
Read more >
Songs not showing up in playlist - YouTube Music Community
1. Open your browser and go to https://music.youtube.com · 2. Click Library, then Playlists, then the playlist you have a problem with. ·...
Read more >
Playlist from Youtube not showing up in Youtube music. - Reddit
Open the playlist in youtube, get the url, change the "www.youtube" to "music.youtube", and then follow these steps.
Read more >
Why don't a lot of my created playlists won't show up ... - Quora
Check your liked videos and see if that playlist shows up. If you don't have any subscribers or a youtube channel, then that's...
Read more >
How to Fix YouTube Music 2022 Recap Not Working or ...
Why is my YouTube Music 2022 Recap not showing up? · You need to have at least 10 hours of music listening time...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found