mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #844] Spotipy hangs, no errors #520
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#520
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 @deramirez1 on GitHub (Aug 10, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/844
Describe the bug
There is an issue with logging and exception handling.
Your code

To recreate this I just used one of the examples from the documents:
Simply passing in some valid credentials and seeing if I can get albums from an artist. I ran this in a loop 10-20 times in a short period of time, with my app in developer mode.
After much digging, I was able to track the problem down by stepping through some functions until I got to the actual GET HTTP request. I looked at the payload, extracted the token, and checked if it was valid. It was not.

I'm in developer mode, without a quota extension. I believe the issue is actually stemming from this rate limit. I've waited a couple days, the problem resolved itself but then after a few calls it came back. Is there an error with the callback that's not returning the 429 error expected here?
Expected behavior
I expected to get a list of albums from this artist but that didn't happen.
Output
Probably the most frustrating of all is that it just hangs. There's no callback saying the token is invalid, or a rate limit has been exceeded, it just spins and spins. The warning expected from Spotify would actually be very helpful. It'll say how long we need to wait until we should execute another HTTP request.
Environment:
@OleHalvor commented on GitHub (Sep 20, 2022):
I'm having the same issue. No errors, the code just hangs when doing spotipy calls.
OS: Windows 10
python version: 3.8.3
spotipy version: 2.23.0
IDE: Pycharm
@nickwan commented on GitHub (Sep 22, 2022):
i'm also having the same issue in Google Colab
link to notebook
https://colab.research.google.com/drive/1mWRiGMRXU13PQFSLTtuLlnRNdXO2G7-D?usp=sharing
Update: i was previously using
SpotifyOAuthso i triedSpotifyClientCredentialsand it ended up working. didn't change anything else. same notebook as above.@jkulak commented on GitHub (Nov 2, 2022):
Check if you are not getting a 429 error (too many requests per Spotify client ID).
@stephanebruckert commented on GitHub (Mar 30, 2023):
Let's continue this discussion in https://github.com/spotipy-dev/spotipy/issues/913