mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #668] Error when querying get_home() #443
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#443
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 @Batwam on GitHub (Nov 1, 2024).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/668
get_home() query no longer works
Hello, I noticed recently that the script I used to get music suggestions no longer works. The error message isn't very clear so I'm not sure what the issue might be but the script worked a few days ago and also returns results when using something like
yt.search("Oasis Wonderwall")...To Reproduce
Test Script using get_home ( doesn't work)
Result
Note that I just tried to generate oauth using another account and this appears to work. Also, I just modified navigation.py to print the content of the
rootvariable and it does contain data, it even contains keys calledwatchEndpointso I'm not 100% sure what the case of the issue is... could it be the some issue with the type of playlists (music Vs videos?)Edit2: I tried using get_home(1) and it worked, then tried again and it no longer work. So perhaps an again issue with the content of the results?
Edit3: using timestamps, I was able to establish that the script does run for a few entries. However, when it lands on some it cannot find the
'watchEndpoint'key and crashing instead of skipping to the next. Is it possible to continue rather than crashing?@Batwam commented on GitHub (Nov 1, 2024):
ok, I temporarily "solved it" by updating navigation.py from
to
but frankly, I still don't think that this shouldn't result in a crash, at best it should be a warning and skip?
@sigma67 commented on GitHub (Dec 17, 2024):
Hi @Batwam
get_homeis hard to debug because it is very user dependent. Could you provide reproduction instructions?What did your homepage look like?
@Batwam commented on GitHub (Dec 27, 2024):
Hello, apologies for the delay as it was a bit tricky to troubleshoot. Responding here even though you closed it as I still believe that this is a bug. I tried to progressively increase the get_home(x) value to see at which section if would fail.
Turns out to be related to the "Listen Again" category with albums which I believe are manual uploads including tracks which I believe have been deleted... Not sure why they are still getting recommended but turns out that some (albums 2 and 3 below) are empty have a link which is 'https://music.youtube.com/channel/undefined' and lead to nowhere essentially.
log below where I'm printing
root[k]. First artist works fine, second one crashes:The part right after the one above is where is starts with what looks like partial data, then fails:
as you can see, it's missing a bunch of fields and eventually crashes, maybe because it's missing
['browseEndpoint']['browseId']withinnavigationEndpointin particular?@sigma67 commented on GitHub (Feb 5, 2026):
Are you still facing this issue? If so, are you willing to submit a fix or provide reproduction instructions?
@Batwam commented on GitHub (Feb 5, 2026):
I need to check if I'm using a patched version of ytmusicapi. I think that I did experience the issue again and had to go back and change the file manually again.
The root cause is actually a bit of an edge case as YT Music seems to be recommending Albums from songs I created/uploaded but since deleted.