mirror of
https://github.com/kokarare1212/librespot-python.git
synced 2026-04-25 08:35:49 +03:00
[GH-ISSUE #222] [BUG] Credentials loading crashes with a json parse error #37
Labels
No labels
bug
dependencies
duplicate
enhancement
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot-python-kokarare1212#37
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 @rathmerdominik on GitHub (Aug 29, 2023).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/222
Describe the bug
Credentials checking or loading can crash with an error when Spotify has a Server error.
To Reproduce
Steps to reproduce the behavior:
librespot.core.Session.Builder().user_pass(username, password).create()Expected behavior
Credentials are read out and a Session is established
Client Information (please complete the following information):
@kokarare1212 commented on GitHub (Aug 29, 2023):
So an API that returns an access point returns html if it is rate-limited...
Is it appropriate to use the raise_for_status function of the request?
@rathmerdominik commented on GitHub (Aug 29, 2023):
Yeah. They really had a great idea there....
I am not sure what can be done if this occurs.
I doubt it is possible to circumvent this. So maybe a nice error saying "You are being rate limited by spotify, or another issue is occuring" would help.
Maybe it is possible to work around it.
It also does not seem to be an IP rate limit (If it is a rate limit at all. The error states it is a "server error") as switching IP with Mullvad or connecting to my home network via sshuttle does not do anything to resolve the situation
@rathmerdominik commented on GitHub (Aug 29, 2023):
Also this is the spot where i entered the print. If it helps at all
@rathmerdominik commented on GitHub (Aug 29, 2023):
There really is a server error right now apparently.
Crazy
@rathmerdominik commented on GitHub (Aug 29, 2023):
This was really a server issue that has now been resolved.
So I changed the issue description.
This is still an edge case that needs handling.
But it is now certain that you can't do much if this occurs