mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #956] Spotipy's sleep_for_retry() function? #576
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#576
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 @CalColistra on GitHub (Mar 30, 2023).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/956
I have been using spotify's spotipy (python) api and my program is getting stuck on a sleep_for_retry(). I can see the sequence of functions being called in my python notebook and it gets stuck at this:
artist() > _get() >_internal_call() > request() > send() > send() > urlopen() > sleep() > sleep_for_retry()Wondering how to avoid their sleep_for_retry() function? I am struggling to find any documentation regarding that function but i have seen some people suggesting this:
time.sleep(<some amount of time here>)but I can't figure out how to get that working.Does anyone have experience with this? I love the spotipy API and I would like to keep using it but I don't want to be making more requests than their server can handle.
the error looks like this:
@stephanebruckert commented on GitHub (Mar 30, 2023):
spotipy should already be waiting/sleeping when the Spotify API response requests to wait (
retry-aftervalue). Maybe there is a scenario where this does not apply.Therefore I'm asking, would you have a Minimal reproducible example that would allow us to reproduce this rate limiting? This would need to work with a new Spotify app.
Feel free to include logs about the current retry-after value, maybe with inspiration from https://github.com/spotipy-dev/spotipy/issues/913#issuecomment-1474314058?
I'm closing to close so we can all discuss in the same thread. Please post your response in https://github.com/spotipy-dev/spotipy/issues/913