Questions tagged [spotipy]

Spotipy is a lightweight Python library for the Spotify Web API. With Spotipy you get full access to all of the music data provided by the Spotify platform.

474 questions
2
votes
1 answer

Get Spotipy album ID from album

Using Spotipy I'm trying to list the tracks by supplied the name of the artist and album. This should be quite straight forward, however I don't know how to get the albumID in order to get the tracklist. I thought it would be something…
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
1
vote
0 answers

Error on deploying Flask API with Spotipy package to Cloud

I wrote this Flask API in order to interact with my app's front-end and the Spotify API. Locally, the API runns fine however when I try to deploy it to Google Cloud and run it, the following error from the Spotipy package shows up: "POST…
Braz
  • 73
  • 6
1
vote
1 answer

Current playlist with Spotipy

I'm trying to loop over the tracks in the current playlist using Spotipy. However, I've got two stumbling blocks: 1, Being about to work out the format of information from Spotipy sp.current_user_playing_track() - I tried a JSON pretty print which…
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
1
vote
1 answer

Convert multiple string to a list in python

I want to get the name of the song from a Spotify playlist for which I am using spotipy library when I print the output it all comes at once I want to get the single name at a time CODE: for track in sp.playlist_tracks(playlist_link)["items"]: …
1
vote
2 answers

How can I compress a b64 file in Python?

I am using the DALLE API to generate images, and taking that file and uploading it to spotify as a playlist cover. However I receive a 413 error when I run the following line: sp.playlist_upload_cover_image(playlist_id=playlist_id,…
1
vote
1 answer

Spotipy Authorization Code Flow "Only valid bearer authentication" Error

I am trying to understand Spotipy library to create some programs for personal use. Initially I have tried and access Spotify using "Client Credentials Flow" but since "Authorization Code Flow" seems more suited for my use cases currently focused on…
AeS
  • 15
  • 4
1
vote
1 answer

How could I create a dataset with data about music such as songs, albums, artists, and their meta data such as when they were published/established?

I am creating an app that will need to access a very large dataset. The dataset will need to have data about music, films, locations, etc. I have started with populating my database with music data and I found the spotipy API. Does anyone know if…
boogers
  • 13
  • 2
1
vote
1 answer

How to handle web based login from a docker container using python and flask?

I writing an application that collects some various data about the song I currently listen to on Spotify. To do this I use Python, flask and spotipy running inside a docker container. The thing is that Spotify's API requires some user input to…
ZombieGoose
  • 37
  • 1
  • 3
1
vote
1 answer

Invalid character "\u24" in tokenPylance with Spotipy environment variables

I want to make environment variables and I was looking at the documentation of Spotipy and it says that instead of "export," I have to use "$env:" because i'm on a windows system. When I did change it though, I keep getting this error: "Invalid…
nich
  • 11
  • 3
1
vote
1 answer

Problem adding song with user_playlist_add_tracks (Unsupported URL / URI., reason: None)

I recently tested an app in Github because I want to create a playlist of song with a list of artists. Here is the link of the project : https://github.com/streadgold/FestivalPlaylistMaker Credentials are good, redirect URI seems to be good also.…
1
vote
0 answers

How to find data on the most-streamed songs of all time on Spotify, globally?

I'm working on a projected with Spotify data and I need a list of the most-streamed songs of all time on Spotify. (Not my own listening history, but the global stream counts) This information should be out there, because songs on Spotify publicly…
Identic
  • 11
  • 1
1
vote
0 answers

Trying to resolve PyLance error for "import spotipy"

import spotipy from spotipy.oauth2 import SpotifyClientCredentials from cred import * # authentication without user client_credentials_manager = SpotifyClientCredentials(client_id = CID, client_secret = SECRET) sp =…
Ryan Park
  • 11
  • 1
1
vote
0 answers

Getting the same user in print(user_id)?

Trying to authenticate is seeing what user is currently logged in. I tried authenticating with a different spotify account but I still get mine. Not sure why. I am getting the token info after the user authenticates and get who the current user is…
Abraham.
  • 69
  • 6
1
vote
0 answers

How do I get all of the tracks released in a specific year using Spotify's API?

I am attempting to get all of the tracks release on Spotify for a given year (e.g. all tracks release in 2018)? I've been looking through their APIs and various projects posted by others, but have not been able to find a solution for this one. One…
topgreg
  • 11
  • 1
1
vote
1 answer

Spotipy (sp.track() specifically) takes too long to run

I am trying to extract the release data, explicit flag and popularity score of approximately 18,000 songs. I want to append these results to my data frame Initially, I tried this. - for i,track in enumerate(df['uri']): …
dsispp
  • 13
  • 2