mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #842] requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) #517
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#517
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 @dkbarn on GitHub (Aug 3, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/842
Describe the bug
In my application I use spotipy pretty heavily, and frequently I see the error:
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))It happens once every few hours. There are already some retry options exposed in the
spotipy.Spotify.__init__, which I am making use of, but this retry functionality seems to only apply to HTTP errors, not low-level ConnectionErrors. Please could we consider adding retry support for any network-related error?Your code
The error can happen on any one of the public API methods that ultimately results in communicating with Spotify's REST API server.
Expected behavior
The spotipy library doesn't not throw an error during regular use.
Output
Environment:
@FrederikP commented on GitHub (Oct 12, 2022):
👍
Looking at the code in
client.pythe retry stuff is initialized like this:The docs say connect and read should be ints:
I would really like to see the ability to provide a custom retry object. In my use case I'm seeing connection errors every time I have a longer running process. Probably connections are dropped one sided and we only find out when we try to do the next request.
@jbkze commented on GitHub (Jul 17, 2023):
This is my workaround: