[GH-ISSUE #20] get_album() fails with a KeyError on 'frameworkUpdates' #15

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

Originally created by @beville on GitHub (May 16, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/20

This one is a bit obscure to me.

Simple code:

albums = ytmusic.get_library_upload_albums(limit=10)
albuminfo = ytmusic.get_album(albums[0]['browseId'])

Results in:

Traceback (most recent call last):
  File "./ytmusic.py", line 155, in <module>
    main()
  File "./ytmusic.py", line 145, in main
    track_ids = get_random_album_tracks(ytmusic, 2)
  File "./ytmusic.py", line 73, in get_random_album_tracks
    albuminfo = ytmusic.get_album(albums[0]['browseId'])
  File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/ytmusic.py", line 373, in get_album
    data = nav(response, FRAMEWORK_MUTATIONS)
  File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/parsers.py", line 284, in nav
    root = root[k]
KeyError: 'frameworkUpdates'

I dumped the response text from library ytmusic.py:373, and attached.
resp.txt

Originally created by @beville on GitHub (May 16, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/20 This one is a bit obscure to me. Simple code: ``` albums = ytmusic.get_library_upload_albums(limit=10) albuminfo = ytmusic.get_album(albums[0]['browseId']) ``` Results in: ``` Traceback (most recent call last): File "./ytmusic.py", line 155, in <module> main() File "./ytmusic.py", line 145, in main track_ids = get_random_album_tracks(ytmusic, 2) File "./ytmusic.py", line 73, in get_random_album_tracks albuminfo = ytmusic.get_album(albums[0]['browseId']) File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/ytmusic.py", line 373, in get_album data = nav(response, FRAMEWORK_MUTATIONS) File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/parsers.py", line 284, in nav root = root[k] KeyError: 'frameworkUpdates' ``` I dumped the response text from library ytmusic.py:373, and attached. [resp.txt](https://github.com/sigma67/ytmusicapi/files/4639082/resp.txt)
kerem 2026-02-27 22:07:33 +03:00
Author
Owner

@sigma67 commented on GitHub (May 17, 2020):

Uploaded albums don't work yet with get_album . The uploaded album pages are processed differently from the uploaded albums.

Same for uploaded artists, the pages are different from the regular artists. I'll work on this soon.

<!-- gh-comment-id:629814758 --> @sigma67 commented on GitHub (May 17, 2020): Uploaded albums don't work yet with `get_album `. The uploaded album pages are processed differently from the uploaded albums. Same for uploaded artists, the pages are different from the regular artists. I'll work on this soon.
Author
Owner

@sigma67 commented on GitHub (May 21, 2020):

Hey, I added two new methods for this purpose. The endpoints where quite different from get_album and get_artist, so that's why I added new ones.

Let me know if these methods work for you!

<!-- gh-comment-id:632277469 --> @sigma67 commented on GitHub (May 21, 2020): Hey, I added two new methods for this purpose. The endpoints where quite different from get_album and get_artist, so that's why I added new ones. Let me know if these methods work for you!
Author
Owner

@beville commented on GitHub (May 22, 2020):

I tried out get_library_upload_album() and it worked for me.

Thanks again doing this project!

On Thu, May 21, 2020 at 11:46 AM sigmatics notifications@github.com wrote:

Hey, I added two new methods for this purpose. The endpoints where quite
different from get_album and get_artist, so that's why I added new ones.

Let me know if these methods work for you!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sigma67/ytmusicapi/issues/20#issuecomment-632277469,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABXU7AHIRDLQ6Y46KTOVF3LRSVZGNANCNFSM4NDBMZ5Q
.

<!-- gh-comment-id:632888765 --> @beville commented on GitHub (May 22, 2020): I tried out get_library_upload_album() and it worked for me. Thanks again doing this project! On Thu, May 21, 2020 at 11:46 AM sigmatics <notifications@github.com> wrote: > Hey, I added two new methods for this purpose. The endpoints where quite > different from get_album and get_artist, so that's why I added new ones. > > Let me know if these methods work for you! > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/sigma67/ytmusicapi/issues/20#issuecomment-632277469>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABXU7AHIRDLQ6Y46KTOVF3LRSVZGNANCNFSM4NDBMZ5Q> > . >
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#15
No description provided.