[GH-ISSUE #116] Read timeouts #52

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

Originally created by @JeremyGrieshop on GitHub (Sep 4, 2016).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/116

Every once in a while, a search never returns. It hangs, seemingly forever, until I have to kill my process and start over.

Is there a way to set a timeout value that can be passed along to the underlying requests object?

Originally created by @JeremyGrieshop on GitHub (Sep 4, 2016). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/116 Every once in a while, a search never returns. It hangs, seemingly forever, until I have to kill my process and start over. Is there a way to set a timeout value that can be passed along to the underlying requests object?
kerem closed this issue 2026-02-27 23:20:36 +03:00
Author
Owner

@eugenio412 commented on GitHub (Sep 4, 2016):

I had the same problem, at the end the problems was that I had a very high ping towards Spotify endpoint, and Spotify wasn't replying, it's weird, but that's how I solved. Try with a VPS with low ping to api.spotify.com

<!-- gh-comment-id:244624719 --> @eugenio412 commented on GitHub (Sep 4, 2016): I had the same problem, at the end the problems was that I had a very high ping towards Spotify endpoint, and Spotify wasn't replying, it's weird, but that's how I solved. Try with a VPS with low ping to api.spotify.com
Author
Owner

@JeremyGrieshop commented on GitHub (Sep 5, 2016):

Thanks for the feedback (again). I'm running my app from my house, and don't have any intention of hosting it somewhere else.

Seems like the spotipy API could simply put a timeout on the 'requests' call and return if no reply comes back in sufficient time.

<!-- gh-comment-id:244780192 --> @JeremyGrieshop commented on GitHub (Sep 5, 2016): Thanks for the feedback (again). I'm running my app from my house, and don't have any intention of hosting it somewhere else. Seems like the spotipy API could simply put a timeout on the 'requests' call and return if no reply comes back in sufficient time.
Author
Owner

@eugenio412 commented on GitHub (Sep 6, 2016):

I know, but that's not how it works right now, I guess they are not interested in very small project, I tried contacting them but they didn't tell my why

<!-- gh-comment-id:244958339 --> @eugenio412 commented on GitHub (Sep 6, 2016): I know, but that's not how it works right now, I guess they are not interested in very small project, I tried contacting them but they didn't tell my why
Author
Owner

@alexey-v-paramonov commented on GitHub (Oct 29, 2016):

I have created a fork and added a new option requests_timeout
https://github.com/alexey-v-paramonov/spotipy
So you can add a timeout on Spotipy initialization like this:
spotify = spotipy.Spotify(requests_timeout=10)

After that all Spotify requests will have that timeout.

<!-- gh-comment-id:257093880 --> @alexey-v-paramonov commented on GitHub (Oct 29, 2016): I have created a fork and added a new option `requests_timeout` https://github.com/alexey-v-paramonov/spotipy So you can add a timeout on Spotipy initialization like this: `spotify = spotipy.Spotify(requests_timeout=10)` After that all Spotify requests will have that timeout.
Author
Owner

@alexey-v-paramonov commented on GitHub (Oct 29, 2016):

#125

<!-- gh-comment-id:257093891 --> @alexey-v-paramonov commented on GitHub (Oct 29, 2016): #125
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#52
No description provided.