[GH-ISSUE #1117] the playlist function stopped working between yesterday and today #663

Closed
opened 2026-02-28 00:00:39 +03:00 by kerem · 6 comments
Owner

Originally created by @jbdaudet on GitHub (May 23, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1117

sp.playlist() was working fine yesterday, and is stuck today: no error message, just no answer.
All the other function I tested are still working fine: sp.album() sp.artist(), etc.
Maybe an evolution of Spotify web API?

Originally created by @jbdaudet on GitHub (May 23, 2024). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1117 sp.playlist() was working fine yesterday, and is stuck today: no error message, just no answer. All the other function I tested are still working fine: sp.album() sp.artist(), etc. Maybe an evolution of Spotify web API?
kerem 2026-02-28 00:00:39 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@dieser-niko commented on GitHub (May 23, 2024):

You have probably hit a rate limit. urllib will wait until the limit is gone, but for some reason this can take quite a long time.

If you want to get an error message instead, just do the following:

sp = spotipy.Spotify(
    retries=0,
    ...
)
<!-- gh-comment-id:2126805057 --> @dieser-niko commented on GitHub (May 23, 2024): You have probably hit a [rate limit](https://developer.spotify.com/documentation/web-api/concepts/rate-limits). urllib will wait until the limit is gone, but for some reason this can take quite a long time. If you want to get an error message instead, just do the following: ```python3 sp = spotipy.Spotify( retries=0, ... ) ```
Author
Owner

@jbdaudet commented on GitHub (May 23, 2024):

You are right: I get a 429 error with the retries=0 option. Not sure why though: I'm asking for one playlist only, and the api is answering to any other request, besides playlist. Thanks a lot for the help!

<!-- gh-comment-id:2126823337 --> @jbdaudet commented on GitHub (May 23, 2024): You are right: I get a 429 error with the retries=0 option. Not sure why though: I'm asking for one playlist only, and the api is answering to any other request, besides playlist. Thanks a lot for the help!
Author
Owner

@dieser-niko commented on GitHub (May 23, 2024):

How often are you using this endpoint? Maybe caching might be helpful.

<!-- gh-comment-id:2126830780 --> @dieser-niko commented on GitHub (May 23, 2024): How often are you using this endpoint? Maybe caching might be helpful.
Author
Owner

@dieser-niko commented on GitHub (May 23, 2024):

And btw, you can actually monitor the usage of the API endpoints in the Spotify dashboard.

<!-- gh-comment-id:2126832480 --> @dieser-niko commented on GitHub (May 23, 2024): And btw, you can actually monitor the usage of the API endpoints in the Spotify dashboard.
Author
Owner

@jbdaudet commented on GitHub (May 23, 2024):

thanks for your feedbacks - I'll optimize my script to request by batch and make it more efficient!

<!-- gh-comment-id:2127018829 --> @jbdaudet commented on GitHub (May 23, 2024): thanks for your feedbacks - I'll optimize my script to request by batch and make it more efficient!
Author
Owner

@dieser-niko commented on GitHub (Jan 3, 2025):

Hi @jbdaudet, just a quick heads up, we have released a new version (2.25.0) that prints a warning when a limit is reached. I'm not sure if you're still using retries=0, but if not, this change will warn you when you reach a limit.

<!-- gh-comment-id:2569215935 --> @dieser-niko commented on GitHub (Jan 3, 2025): Hi @jbdaudet, just a quick heads up, we have released a new version (2.25.0) that prints a warning when a limit is reached. I'm not sure if you're still using `retries=0`, but if not, this change will warn you when you reach a limit.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#663
No description provided.