Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

User ID doesn't work?? (spotipy)

Solved!

User ID doesn't work?? (spotipy)

Plan
Premium
Country
Japan
Device
Macbook Air (M1, 2020)
Operating System
macOS Monterey 12.0.1

 

Nice to meet you.


"My user information(?)" suddenly doesn't work in "spotipy".
For example, nothing happens inputing user id in "sp.user_playlists()", and 
"sp.user_playlist_add_tracks()" doesn't reference my "playlist_id".
So I run "control+c", and the program say "~... time.sleep(retry_after)".
This result is the same about any program.


It happened while I was writing and running the program.
Maybe, I was stopped from using the program because of the large number of requests?
I’d like to ask you for your help on this problem please.

 

Reply

Accepted Solutions
Marked as solution

I was able to solve the problem on my own.
By clearing the cache file in my home directory, the error does not appear!!

View solution in original post

3 Replies

I forget writing the definition of "sp".
 
username = user ID
my_id =client ID
my_secret = client secret ID

scope = 'user-library-read playlist-read-private playlist-read-collaborative playlist-modify-public playlist-modify-private'

token = util.prompt_for_user_token(username, scope, my_id, my_secret, redirect_uri)
sp = spotipy.Spotify(auth = token)

I tried re-creating the dashboard and re-authenticating again, but "Invalid client" occurred.

I don't know what to do.

Marked as solution

I was able to solve the problem on my own.
By clearing the cache file in my home directory, the error does not appear!!

Suggested posts