mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #393] get_artist() not always getting albums & singles #305
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#305
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 @Noiyy on GitHub (May 13, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/393
Describe the bug
Sometimes, for some reason, when I try to
get_artist(), it will return a dictionary without "albums"and "singles" and then I end up getting
KeyError: "albums"or"singles"when I try to access them.To Reproduce
Steps to reproduce the behavior:
artistIDwith.search(query, "artists", limit=1)[0]["browseId"]artistwith.get_artist(artistID)artist["albums"]orartist["singles"]Additional context
Also, I don't think
limitinsearch()works, since it returns more than 1 artistget_artist()dictionaryWithout KeyError
With KeyError
@sigma67 commented on GitHub (May 13, 2023):
Likely related to #392
Please check if you have "Top Releases" when going to an artist's page, if yes this issue is a duplicate. Check here: https://music.youtube.com/channel/UClmXPfaYhXOYsNn_QUyheWQ
Regarding limit: https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter
@Noiyy commented on GitHub (May 13, 2023):
Nope, I don't have "Top Releases" there.

@sigma67 commented on GitHub (May 13, 2023):
Are you sure you are using the same account as your instance of
YTMusic? Are you passing credentials toYTMusicthat belong to the same account?I mean, it seems odd that you're only getting this sometimes.
@Noiyy commented on GitHub (May 13, 2023):
I'm using it unauthenticated, since I don't have any need to do that. It is very odd indeed, why it happens only sometimes.
@sigma67 commented on GitHub (May 13, 2023):
Ah alright. I suppose A/B testing would do that when you're not signed in. Please follow #392 for updates.