[GH-ISSUE #220] KeyError: 'watchPlaylistEndpoint' on get_album() #173

Closed
opened 2026-02-27 22:08:26 +03:00 by kerem · 3 comments
Owner

Originally created by @KoljaWindeler on GitHub (Aug 16, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/220

Hi @sigma67, i guess ytube changed something again ..
running ... get_album(browseId=MPREb_a1kLPIgLhc6) returns the error below for the several last days, all other commands works just fine. (and my code didn't change for get_album)

2021-08-16T16:59:59.273542400Z   File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
2021-08-16T16:59:59.273551456Z     result = self.fn(*self.args, **self.kwargs)
2021-08-16T16:59:59.273559915Z   File "/usr/local/lib/python3.9/site-packages/ytmusicapi/mixins/browsing.py", line 463, in get_album
2021-08-16T16:59:59.273567755Z     album = parse_album_header(response)
2021-08-16T16:59:59.273574801Z   File "/usr/local/lib/python3.9/site-packages/ytmusicapi/parsers/albums.py", line 28, in parse_album_header
2021-08-16T16:59:59.273582192Z     album['audioPlaylistId'] = nav(toplevel, [0, 'buttonRenderer'] + NAVIGATION_WATCH_PLAYLIST_ID)
2021-08-16T16:59:59.273589638Z   File "/usr/local/lib/python3.9/site-packages/ytmusicapi/parsers/utils.py", line 155, in nav
2021-08-16T16:59:59.273597041Z     raise err
2021-08-16T16:59:59.273603889Z   File "/usr/local/lib/python3.9/site-packages/ytmusicapi/parsers/utils.py", line 149, in nav
2021-08-16T16:59:59.273633270Z     root = root[k]
2021-08-16T16:59:59.273642397Z KeyError: 'watchPlaylistEndpoint'

how can i provide more info for you?
Thanks JKW and thanks as always for your work!!

Originally created by @KoljaWindeler on GitHub (Aug 16, 2021). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/220 Hi @sigma67, i guess ytube changed something again .. running ... get_album(browseId=MPREb_a1kLPIgLhc6) returns the error below for the several last days, all other commands works just fine. (and my code didn't change for get_album) ``` 2021-08-16T16:59:59.273542400Z File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run 2021-08-16T16:59:59.273551456Z result = self.fn(*self.args, **self.kwargs) 2021-08-16T16:59:59.273559915Z File "/usr/local/lib/python3.9/site-packages/ytmusicapi/mixins/browsing.py", line 463, in get_album 2021-08-16T16:59:59.273567755Z album = parse_album_header(response) 2021-08-16T16:59:59.273574801Z File "/usr/local/lib/python3.9/site-packages/ytmusicapi/parsers/albums.py", line 28, in parse_album_header 2021-08-16T16:59:59.273582192Z album['audioPlaylistId'] = nav(toplevel, [0, 'buttonRenderer'] + NAVIGATION_WATCH_PLAYLIST_ID) 2021-08-16T16:59:59.273589638Z File "/usr/local/lib/python3.9/site-packages/ytmusicapi/parsers/utils.py", line 155, in nav 2021-08-16T16:59:59.273597041Z raise err 2021-08-16T16:59:59.273603889Z File "/usr/local/lib/python3.9/site-packages/ytmusicapi/parsers/utils.py", line 149, in nav 2021-08-16T16:59:59.273633270Z root = root[k] 2021-08-16T16:59:59.273642397Z KeyError: 'watchPlaylistEndpoint' ``` how can i provide more info for you? Thanks JKW and thanks as always for your work!!
kerem closed this issue 2026-02-27 22:08:26 +03:00
Author
Owner

@sigma67 commented on GitHub (Aug 18, 2021):

It seems this is an issue with the new response format for albums. Apparently not everyone is getting the changed version of it. I added a fallback so it works either way.

<!-- gh-comment-id:901123922 --> @sigma67 commented on GitHub (Aug 18, 2021): It seems this is an issue with the new response format for albums. Apparently not everyone is getting the changed version of it. I added a fallback so it works either way.
Author
Owner

@KoljaWindeler commented on GitHub (Aug 18, 2021):

tested and confirmed that this fixes the issue. thanks. Can I ask you to release a minor version?

<!-- gh-comment-id:901137446 --> @KoljaWindeler commented on GitHub (Aug 18, 2021): tested and confirmed that this fixes the issue. thanks. Can I ask you to release a minor version?
Author
Owner

@sigma67 commented on GitHub (Aug 18, 2021):

For sure!

<!-- gh-comment-id:901151875 --> @sigma67 commented on GitHub (Aug 18, 2021): For sure!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#173
No description provided.