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.
Questions tagged [spotipy]
474 questions
-1
votes
1 answer
Issue: i'm trying to pause spotify playing using a python script
What i'm trying to realise with this python script is to stop spotify from playing when it's prayer time , but it never seems to work although i read tens of article of dealing with spotify for developpers and conversations with chatgpt, this is…

KhaliLounis
- 11
- 3
-1
votes
2 answers
How can I fix the 'ffmpeg was not found' error when playing music in a Discord bot with Python and Spotipy?
I have a problem with my code. I set myself a goal to write a Discord bot that would perform basic actions. I got stuck on the play() function when I enter the command ">play [track_url]". It gives me an error:
Traceback (most recent call last):
…

Zala145
- 3
- 1
-1
votes
1 answer
Flask Return Render Template Not Working (Spotify API)
I'm trying to create a webpage which display's the user's current playing track details and auto updates but the html page does not refresh the variables when the track changes even though the python program runs flawlessly without throwing…

Aryan Bhajanka
- 1
- 2
-1
votes
1 answer
How to merge two dictionaries?
I'm building a program powered by Spotify API with Spotipy library. I want to get a user's saved tracks in their Spotify library. Spotipy has a function called current_user_saved_tracks and does that exactly. But there's a track limit which is 50. I…

omelias
- 21
- 1
- 8
-1
votes
1 answer
Access Token From Spotify API is the Same One For Each User
So during testing, I was able to sign in with 1 spotify account at the login page and receive a correct access code and token. However, when I run and close the app, and run it again, I went on an incognito tab (with no cookies) and was able to…

A Simple Coder
- 1
- 2
-1
votes
1 answer
Get popularity of track (spotipy)
How could I get the popularity of a single track from its ID using spotipy?
For example, I have the following song id: 6YNuS3tJfip0Xqw9Ixzint. How could I get its popularity using spotipy?
I've found methods to get the popularity of all tracks in a…

THEMOUNTAINSANDTHESKIES
- 542
- 7
- 22
-1
votes
1 answer
Not getting any data entry with 'find_all' while scraping Spotify Charts webpage
I am trying to scrape the spotify charts containing top 200 songs in India on 2022-02-01. My python code :
#It reads the webpage.
def get_webpage(link):
page = requests.get(link)
soup = bs(page.content, 'html.parser')
return(soup)
#It…

kchahat20
- 97
- 1
- 11
-1
votes
2 answers
How to get URI of the Artist from Spotify without having to manually copy the URI of Artist from Spotify
I'm working on this Music player project which I built with Pygame, there are many tutorials on how to make a music player - the UI, the widgets, the functionality but every tutorial uses the choose from folder feature, but I am planning to make…

gracyashhh
- 89
- 1
- 11
-1
votes
2 answers
Spotipy: ‘TypeError: 'NoneType' object is not subscriptable’ when trying to access playlists
Revisiting some year-old code for getting musical features data through the Spotify API, I’m now getting this error when I try to re-run it.
This is the gist of my code:
https://github.com/rjdkirk/spotipy_study/blob/main/Spotify_playlists_v1.py
More…

rjdKirk
- 1
- 2
-1
votes
1 answer
Can you capture what a user is currently listening to?
I'm currently working on a project that detects when someone is listening to a song on Spotify and sends a message to that person based upon that song being in a playlist.
I couldn't see a spotipy function to get this data, even though I can see it…

Harvey
- 1
-1
votes
1 answer
Can't set client id with Spotipy
I keep on getting this error:
I have had this before and simply set the variables like in this:
But that is not working, I simply get the error again.
On the Spotipy docs it shows that you have to type "export SPOTIPY_CLIENT_ID" but because I am…

needassistance
- 1
- 2
-1
votes
1 answer
get the name of a track from its id in spotipy
I have found lots of methods to get the id of a Spotify track but I haven't managed to find a method where I can get the name of one, couldn't find anything in the docs, or I'm just looking in the wrong place. Can anyone help?

matt36
- 35
- 4
-1
votes
1 answer
AttributeError Spotipy
Earlier today I had no problem accessing the Spotipy API but all of a sudden it stopped working. When I forexample run the following:
spotipy.artist("5rSXSAkZ67PYJSvpUpkOr7")
Where 5rSXSAkZ67PYJSvpUpkOr7 is the Spotify ID of an artist, I get the…

andKaae
- 173
- 1
- 13
-1
votes
2 answers
Issue with 'else' sequence using Spotipy/Spotify API
My team and I (newbies to python) have written the following code to generate spotify songs related to a specific city and related terms.
If the user inputs a city that is not in our CITY_KEY_WORDS list, then it tells the user that the input will be…

Lulu L
- 3
- 1
-1
votes
1 answer
Says I'm missing 1 position argument (a spotipy object) Flask
Working with flask to make a website. After I get user input using POST I need to send the retrieved info to another function.
Getting Error that says:
TypeError: search() missing 1 required positional argument: 'spotifyObj'
Here is the code I…

wcii
- 11
- 1
- 2