mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #1105] Issue with sp.track(track_id) function freezing code execution #657
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#657
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 @JosepVargasf on GitHub (May 9, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1105
Hello everyone.
I am encountering an issue while using the sp.track(track_id) function in my code. Whenever I execute this function, my code freezes, seemingly awaiting a response from Spotify that never arrives. I suspect there might be a delay or lack of response from Spotify's end. Could someone provide assistance or guidance on how to resolve this issue?
`from .escribir_metadata import escribir_metadata
def obtener_genero_cancion(spotify, track_id):
# Obtener los detalles de la pista
track_data = spotify.track(track_id)
def obtener_metadata(sp, funcion_opciones):
@dieser-niko commented on GitHub (May 9, 2024):
The freezing effect is due to the urllib library being triggered by a rate limit. urllib basically waits until the rate limit is gone.
If you want to throw an error instead, you can pass
retries=0to the Spotify init function like this:@dieser-niko commented on GitHub (May 17, 2024):
Closing as the problem seems to have been solved.
@dieser-niko commented on GitHub (Jan 3, 2025):
Hi @JosepVargasf, just a quick heads up, we have released a new version (2.25.0) that prints a warning when a limit is reached. I'm not sure if you're still using
retries=0, but if not, this change will warn you when you reach a limit.