mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #173] get_album() results in KeyError: 'frameworkUpdates' #134
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jake-g on GitHub (Mar 11, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/173
Have never had issues before (aside from my auth key going expired) until recently. Most of the other api calls work fine such as :
search()get_liked_songs()ect, so i assume my auth key is still valid. I only see this issue withget_album().To be sure my problem is repeatable, i was able to replicate in. a fresh python 3.9 venv with the following
...then in the python console
(note i tried other
browseIdvalues forget_album()likeget_album("MPREb_4pL8gzRtw1p")fromtest.pyany ideas? I saw some closed issues with similar errors, but i think this issue recently popped up, my code worked fine about a month ago
@sigma67 commented on GitHub (Mar 11, 2021):
It still works fine for me. Are you perhaps part of some beta program? Odd that only this endpoint should stop working for you. Do you also get this error when you are not using a headers file?
@jake-g commented on GitHub (Mar 12, 2021):
huh, strange works fine if it initialize without referencing my header, i.e
yt = YTMusic(). I just tried to make a freshheaders_auth.jsonby pasting what is described in the Manual file creationFile then getting a Cookie string from my browser
@jake-g commented on GitHub (Mar 13, 2021):
Ahh fixed it, I had wrongfully assumed
X-Goog-Visitor-Idstayed the same and theCookiewas the only field inheaders_auth.jsonthat might change over time.I used the method of pasting the raw text from the cookie into the following:
YTMusic.setup(filepath="headers_auth.json", headers_raw=cookie)(note in the docs there is a slight typo, there should be quotes around the filepath string arg as i show above)
Which saves a
header_auth.json.When i compared this too the header file I created manually i noticed they were identical except
X-Goog-Visitor-Id. My id must have changed for some reason and that is what caused my issues.@sigma67 commented on GitHub (Mar 13, 2021):
In that case we should probably add
X-Goog-Visitor-Idto required cookies and fix that doc typo. Thanks for the taking the time to figure this out.@jake-g commented on GitHub (Mar 13, 2021):
i may have jumped the gun with my above resolution. with my current
header_auth.jsonsaved as described above, I can make most authenticated requests, but i once again have the same error when usingget_album()(i didnt realize this until later).It seems
get_album()is fine when i am not authenticated, but as soon as i authenticate, it gives me a framework errorcontinuing to experiment around
@sigma67 commented on GitHub (Mar 13, 2021):
That error indicates that data is missing from the response. Perhaps you can post your full response here? Then we can figure out if it's in a different format (beta user) or just missing altogether (auth issue, probably what's happening). That would involve setting a breakpoint at l.433 in mixins/browsing.py and dumping the data of the response variable.
@jake-g commented on GitHub (Mar 13, 2021):
Here is the full error. It seems to point to the same part of
browsing.pythat your reference@sigma67 commented on GitHub (Mar 15, 2021):
Yes, that's the same error message you posted above. That doesn't provide much information except that part of the response is missing that is usually there.
I was referring to the full response, i.e. if there is something new in the response that we aren't seeing on regular accounts ( if you are a beta user ). You can dump the response by debugging locally.
Alternatively, if you want me to debug this for you you can also send the headers_auth.json to ytmusicapi@gmail.com and I'll have a look. You can invalidate those credentials later by logging out in the browser that you captured them from.
Something else you can try is using a different brand account to see if the error persists (i.e. change the user parameter of YTMusic()).
@jake-g commented on GitHub (Mar 16, 2021):
ok, i see, thanks. I don't think the 'brand account' applies to me, perhaps some sort of beta (I've had a monthly script which has worked fine for 6+ mo until recently).
I tried starting from scratch again logging in from an incognito browser and still no luck. Ill send you an email as im not totally sure what i should be looking for in the full response.
@sigma67 commented on GitHub (Mar 16, 2021):
Thanks for providing the cookie! You are indeed part of a beta program or early rollout. Seems they are finally adjusting the album endpoint to match all the other endpoints with lists of songs.
On the upside, this will probably simplify the code of ytmusicapi quite a bit. However, we will no longer have access to durationMs and lengthMs, only the formatted durations we have with playlists now.
Not sure if we should implement this now or wait until it's generally available. Testing will certainly be difficult if it these responses are only available to some users.
@jake-g commented on GitHub (Mar 18, 2021):
thanks for the support! Im thinking i may be the only one with this issue right now so maybe an official implementation isnt necessary...but i would be happy to help figure out (and benefit from) a fix, maybe just locally or in a 'future' branch.
@sigma67 commented on GitHub (Mar 18, 2021):
Sure! I'll have a go when I have some free time.
@rowannicholls commented on GitHub (Mar 30, 2021):
Hi, I'm experiencing the exact same issue as described above;
.get_album()stopped working after upgrading to v0.15.0. My error message looks the same and other methods like.get_library_songs()still work so I doubt it's an issue with the authentication.@rowannicholls commented on GitHub (Mar 30, 2021):
Actually, the problem persists after downgrading to previous versions, so it doesn't look something introduced in 0.15.0
@sigma67 commented on GitHub (Mar 30, 2021):
Yes, nothing changed in that version. I presume more and more users are getting moved to the build OP was on, so should probably start work on the change soon.
@sigma67 commented on GitHub (Apr 1, 2021):
Hi guys, I'd appreciate if you could test with latest master and param
beta=True.@matclab commented on GitHub (Apr 1, 2021):
Nice job !
It seems to work well here (at least no more
frameworkUpdatesexception and a sensible json response… As it is my first try to use ytmusicapi, I can not say if it works as intended… I have to use it a bit more).Thank you.
@rowannicholls commented on GitHub (Apr 1, 2021):
Yip, looking good for me
@jake-g commented on GitHub (Apr 6, 2021):
yeess! working for me
@sigma67 commented on GitHub (Oct 28, 2021):
Old code has now been removed in
7a49cd7as it seems it's no longer being used. Please report back if the new code isn't working for someone.