Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotipy hangs, no errors #844

Closed
deramirez1 opened this issue Aug 10, 2022 · 4 comments
Closed

Spotipy hangs, no errors #844

deramirez1 opened this issue Aug 10, 2022 · 4 comments
Labels

Comments

@deramirez1
Copy link

deramirez1 commented Aug 10, 2022

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:
image
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.
image

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:

  • OS: Windows 10
  • Python version: 3.8.3
  • spotipy version: 2.20
  • your IDE: originally Jupyter Notebook, but then VS Code has the same problem
@deramirez1 deramirez1 added the bug label Aug 10, 2022
@OleHalvor
Copy link

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
Copy link

nickwan commented 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 SpotifyOAuth so i tried SpotifyClientCredentials and it ended up working. didn't change anything else. same notebook as above.

@jkulak
Copy link

jkulak commented Nov 2, 2022

Check if you are not getting a 429 error (too many requests per Spotify client ID).

@stephanebruckert
Copy link
Member

Let's continue this discussion in #913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants