mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #799] spotify package doesn't work #497
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#497
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 @ZoeLeung2021 on GitHub (May 1, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/799
Describe the bug
In the morning I can get the output from the below code, but at night when I clear all the output and start again, it keeps running and last for more than 3 hours but did not appear any output. I have tried using my local environment, faculty as well as google colab, all come across the same problem. The thing is I cannot even import spotify package now.
Your code
!pip install spotipy
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
client_credentials_manager = SpotifyClientCredentials(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
artist_id=[]
for i in spotify_id_list:
artist_id.append(sp.track(i)["artists"][0]["id"])
audio_features=[]
for i in spotify_id_list:
audio_features.append(sp.audio_features(i)[0])
@Peter-Schorn commented on GitHub (May 1, 2022):
You need to find the function in which the code freezes. Can you do that?
@ZoeLeung2021 commented on GitHub (May 1, 2022):
Yes. It’s the sp.track(i) and sp.audio_features(i) that freeze. I am thinking if rate limit also apply for the Spotify package?
@Peter-Schorn commented on GitHub (May 1, 2022):
Yes the rate limit applies when using spotipy because it's merely a wrapper around the Spotify web API. But if your requests are rate-limited, then the code won't freeze; instead, you'll get an error response.
You need to find the method within
trackandaudio_featuresthat freezes.Do you not know how to step through code in the debugger?
The information you've provided thus far is hopelessly inadequate for solving your issue.
@williamxnguyen commented on GitHub (Jun 19, 2022):
Wow Peter
@dieser-niko commented on GitHub (Mar 4, 2025):
Closing as there is no activity or reply from the author.