mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #1024] Max retries reached when trying to get saved songs. #608
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#608
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 @Junglejon on GitHub (Aug 29, 2023).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1024
Describe the bug
If I call spotipy.current_user_saved_tracks() against my current library, I get a get 'Max reries reached' error.
I have nearly 26k files in my library, but the content should be paged but I don't seem to even be able to get past the first page.
Your code
saved_tracks_response = self.sp.current_user_saved_tracks()
My scope is set to 'user-library-read'.
Expected behavior
Should get a pageable response to iterate through like songs.
Output
http status: 429, code:-1 - /v1/me/tracks?offset=20&limit=20:
Max Retries, reason: too many 500 error responses
File "D:\git\Junglescripts\Python.venv\Lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "D:\git\Junglescripts\Python.venv\Lib\site-packages\urllib3\connectionpool.py", line 941, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "D:\git\Junglescripts\Python.venv\Lib\site-packages\urllib3\connectionpool.py", line 941, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "D:\git\Junglescripts\Python.venv\Lib\site-packages\urllib3\connectionpool.py", line 941, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "D:\git\Junglescripts\Python.venv\Lib\site-packages\urllib3\connectionpool.py", line 931, in urlopen
retries = retries.increment(method, url, response=response, _pool=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\git\Junglescripts\Python.venv\Lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.spotify.com', port=443): Max retries exceeded with url: /v1/me/tracks?offset=20&limit=20 (Caused by ResponseError('too many 500 error responses'))
If I step through, I can get a page of results, so perhaps I need to change the timeout?
Environment:
Additional context
If I step through the
@dieser-niko commented on GitHub (May 21, 2024):
Closing as there's a duplicate (#1093). Your issue was here first, but the one mentioned is a bit more tidy. I hope you don't mind.