[GH-ISSUE #151] Retry-After needs small additional delay to work properly #68

Closed
opened 2026-02-27 23:20:40 +03:00 by kerem · 4 comments
Owner

Originally created by @akashlevy on GitHub (Jan 12, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/151

The code for Retry-After doesn't work for me. I'm on a very fast computer with a very fast internet connection and the problem I'm having is that even though the request is being retried after the specified time, the server is still not ready for the request when it arrives. I fixed this problem for myself by adding an additional one second delay to the retry code. This should be fixed in a future version of this library. I'd be happy to make a pull request if anyone else is having this issue or if the authors think it would be useful.

Originally created by @akashlevy on GitHub (Jan 12, 2017). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/151 The code for Retry-After doesn't work for me. I'm on a very fast computer with a very fast internet connection and the problem I'm having is that even though the request is being retried after the specified time, the server is still not ready for the request when it arrives. I fixed this problem for myself by adding an additional one second delay to the retry code. This should be fixed in a future version of this library. I'd be happy to make a pull request if anyone else is having this issue or if the authors think it would be useful.
kerem closed this issue 2026-02-27 23:20:41 +03:00
Author
Owner

@plamere commented on GitHub (Jan 22, 2017):

I'll incorporate this change

<!-- gh-comment-id:274329346 --> @plamere commented on GitHub (Jan 22, 2017): I'll incorporate this change
Author
Owner

@bentappin commented on GitHub (Jan 22, 2017):

Seems sensible to wait for the delay that Spotify specify. Maybe they were just a bit slow that day for some reason?

<!-- gh-comment-id:274340238 --> @bentappin commented on GitHub (Jan 22, 2017): Seems sensible to wait for the delay that Spotify specify. Maybe they were just a bit slow that day for some reason?
Author
Owner

@akashlevy commented on GitHub (Jan 22, 2017):

I'd say there should be some small additional timeout, perhaps a couple milliseconds? In case this is a regular thing, it would be good to have a safety net.

<!-- gh-comment-id:274340323 --> @akashlevy commented on GitHub (Jan 22, 2017): I'd say there should be some small additional timeout, perhaps a couple milliseconds? In case this is a regular thing, it would be good to have a safety net.
Author
Owner

@DavidDiasData commented on GitHub (Aug 18, 2019):

Hi, I have the same problem.

Could you update the solution, please?

My best,

<!-- gh-comment-id:522354491 --> @DavidDiasData commented on GitHub (Aug 18, 2019): Hi, I have the same problem. Could you update the solution, please? My best,
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#68
No description provided.