Can’t access spotify genres with Spotipy’s recommendation_genre_seeds() function
I’m currently writing an application that takes in a user prompt and their listening data and creates a playlist for them. I also analyse the prompt with a bart model to identify which genres of music are most suitable.
Spotify: Intermittent HTTPError 401 when searching for tracks
I have a script that searches for tracks using the spotify API everyhour. I have noticed that the script throws HTTPError 401 on some search requests. The script requests for new access token in every run. The following is how the authorization function works:
An error occurred: can only concatenate tuple (not “str”) to tuple when using Spotipy functions
When i try to call .playlist_tracks() or .track() and i send in string i get this error:
can only concatenate tuple (not “str”) to tuple
spotify api I want to get the top 10 albums of a record label
I can’t find a way to search by label, I saw in the documentation that there is a copyright section, but I don’t know how to implement it to get only the top 10.
How to handle Spotify API fetching different track IDs over time?
I am currently working on a project that stores files as Spotify playlists. I coincidentally already had a playlist with almost exactly the right amount of tracks, so I used Spotify to fetch all 8192 (2^13) track IDs and made a lookup dictionary between each track ID and a corresponding 13bit string of binary. My program reads the binary and adds the corresponding track IDs to a playlist to write the file to the playlist, and to read the file from the playlist I fetch all the IDs from the playlist and uses the lookup dictionary to convert it back to binary.
spotipy API base-62 error for adding track to playlist
I’m running into an error using the spotipy
package. It seems to say that the playlist ID or track ID isn’t valid, but I can visit the link to both and they work. Unsure what I’m doing wrong. Any help is appreciated. I’m sure I’m missing something obvious.
p.recommendations() randomly stopped working for no clear reason? (spotipy)
scope = “user-library-read user-top-read user-read-private user-read-email” sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope=scope)) recommendations = sp.recommendations(seed_genres=[‘pop’], limit=1) print(recommendations) This code was working perfectly earlier, but it randomly stopped working. I have SPOTIPY_CLIENT_ID, SPOTIPY_CLIENT_SECRET, and SPOTIPY_REDIRECT_URI all defined as environment variables. When I run functions such as sp.current_user_top_tracks(), sp.artist(), and others, they all work fine. When I run sp.recommendations(), nothing […]