[GH-ISSUE #799] spotify package doesn't work #497

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

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])

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])
kerem 2026-02-27 23:22:57 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Peter-Schorn commented on GitHub (May 1, 2022):

You need to find the function in which the code freezes. Can you do that?

<!-- gh-comment-id:1114152471 --> @Peter-Schorn commented on GitHub (May 1, 2022): You need to find the function in which the code freezes. Can you do that?
Author
Owner

@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?

<!-- gh-comment-id:1114181517 --> @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?
Author
Owner

@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 track and audio_features that 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.

<!-- gh-comment-id:1114358134 --> @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 `track` and `audio_features` that 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.
Author
Owner

@williamxnguyen commented on GitHub (Jun 19, 2022):

Wow Peter

<!-- gh-comment-id:1159594447 --> @williamxnguyen commented on GitHub (Jun 19, 2022): Wow Peter
Author
Owner

@dieser-niko commented on GitHub (Mar 4, 2025):

Closing as there is no activity or reply from the author.

<!-- gh-comment-id:2697173881 --> @dieser-niko commented on GitHub (Mar 4, 2025): Closing as there is no activity or reply from the author.
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#497
No description provided.