sigma67/ytmusicapi

KeyError: 'singleColumnBrowseResultsRenderer'

Closed this issue · 3 comments

Describe the bug
Got this error when trying to get results from get_playlist

To Reproduce
Steps to reproduce the behavior:

  1. Auth via this https://ytmusicapi.readthedocs.io/en/stable/setup/browser.html#manual-file-creation
  2. create file .auth.json
  3. run python file.py
  4. See error

Code

from ytmusicapi import YTMusic

MUSIC = YTMusic(".auth.json", language='en')


playlists = MUSIC.get_library_playlists()
print("ID", playlists[0]['playlistId'])

items = MUSIC.get_playlist(playlists[0]['playlistId'], 100)
print(items)

Additional context

 python index.py
ID LM
Traceback (most recent call last):
  File "F:\coding\wip\yt-music-manager\index.py", line 10, in <module>
    items = MUSIC.get_playlist(playlists[0]['playlistId'], 100)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\ytmusicapi\mixins\playlists.py", line 110, in get_playlist
    results = nav(response,
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\ytmusicapi\navigation.py", line 81, in nav
    raise err
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\ytmusicapi\navigation.py", line 75, in nav
    root = root[k]
KeyError: 'singleColumnBrowseResultsRenderer'

What version of ytmusicapi are you using?

ytmusicapi==0.25.2

oh, i was using very old version, and i thought pip install ytmusicapi would update it but i was wrong

forced to update and now it's fine