[GH-ISSUE #117] KeyError: 'musicImmersiveHeaderRenderer' #84

Closed
opened 2026-02-27 22:07:55 +03:00 by kerem · 1 comment
Owner

Originally created by @OzymandiasTheGreat on GitHub (Dec 8, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/117

When calling get_artist() with browseId received from get_library_artists() I get
KeyError: 'musicImmersiveHeaderRenderer'.
If I call get_artist() with channelId from the browser, it works as intended.

Here's the traceback:

Traceback (most recent call last):
  File "/home/ozymandias/Projects/mopidy/.venv/lib/python3.8/site-packages/mopidy_ytmusic/backend.py", line 487, in browse
    res = API.get_artist(id_)
  File "/home/ozymandias/Projects/mopidy/.venv/lib/python3.8/site-packages/ytmusicapi/mixins/browsing.py", line 206, in get_artist
    header = response['header']['musicImmersiveHeaderRenderer']
KeyError: 'musicImmersiveHeaderRenderer'
Originally created by @OzymandiasTheGreat on GitHub (Dec 8, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/117 When calling `get_artist()` with `browseId` received from `get_library_artists()` I get `KeyError: 'musicImmersiveHeaderRenderer'`. If I call `get_artist()` with channelId from the browser, it works as intended. Here's the traceback: ``` Traceback (most recent call last): File "/home/ozymandias/Projects/mopidy/.venv/lib/python3.8/site-packages/mopidy_ytmusic/backend.py", line 487, in browse res = API.get_artist(id_) File "/home/ozymandias/Projects/mopidy/.venv/lib/python3.8/site-packages/ytmusicapi/mixins/browsing.py", line 206, in get_artist header = response['header']['musicImmersiveHeaderRenderer'] KeyError: 'musicImmersiveHeaderRenderer' ```
kerem 2026-02-27 22:07:55 +03:00
  • closed this issue
  • added the
    yt-update
    label
Author
Owner

@sigma67 commented on GitHub (Dec 9, 2020):

This is due to a recent YouTube update. When you click on an artist in your library, you are now shown the artist's songs in your library, with another link pointing to the actual artist. This endpoint is not yet implemented in ytmusicapi.

The browseId used for this new page is in the following format: MPLA + channelId. So if you simply remove those first 4 letters, you should be able to use get_artist with the browseId returned by get_library_artists.

<!-- gh-comment-id:741637471 --> @sigma67 commented on GitHub (Dec 9, 2020): This is due to a recent YouTube update. When you click on an artist in your library, you are now shown the artist's songs in your library, with another link pointing to the actual artist. This endpoint is not yet implemented in ytmusicapi. The browseId used for this new page is in the following format: `MPLA` + `channelId`. So if you simply remove those first 4 letters, you should be able to use `get_artist `with the browseId returned by `get_library_artists`.
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#84
No description provided.