mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #13] user_playlists_contents.py and user_starred_playlist.py examples failing #4
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @purplehat7 on GitHub (Jun 28, 2014).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/13
I tried StackOverflow first, as I thought this was more something I was doing wrong and less a problem with the code itself, but I was redirected here. Anyways, here's what I wrote at Stack Overflow:
@plamere commented on GitHub (Jul 1, 2014):
Hi acannon - how are you setting the CLIENT_ID, CLIENT_SECRET and REDIRECT_URI?
@purplehat7 commented on GitHub (Jul 13, 2014):
I was setting them as global vars within the script as opposed to env vars. Oops. Thanks! Would setting these vars be worth adding to the quick start docs? Or is having to do this obvious to everyone else but me?
@1337sup3rh4x0r commented on GitHub (Nov 25, 2014):
Can you maybe explain how to correctly set these variables?
I simply added the three lines into the python file below the import lines like this:
SPOTIPY_CLIENT_ID='xxx'
SPOTIPY_CLIENT_SECRET='yyy'
SPOTIPY_REDIRECT_URI='zzz'
and the script won't run, telling me
spotipy.client.SpotifyException: http status: 550, code:-1 - no credentials set
@plamere commented on GitHub (Nov 25, 2014):
those should be set as environment variables. How you set them varies depenidng on what OS you are on. See https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=setting%20environment%20variables
@1337sup3rh4x0r commented on GitHub (Nov 27, 2014):
Ah ok now I get what is meant by that. Thank you :)
@1337sup3rh4x0r commented on GitHub (Nov 28, 2014):
I am getting further along the login process now but at the point where the CLI output tells me to visit a link and enter the redirect url afterwards it fails. The link sends me to a page which returns "INVALID_CLIENT: Invalid redirect URI" and when I enter the redirect URL (www.google.com) anyway, the CLI returns "spotipy.oauth2.SpotifyOauthError: Bad Request"
Maybe I got this whole redirect thing wrong? What is it needed for? Do I need to host a site which implements some code to get authenticated?I basically just want to run a python script that outputs the contents of a playlist ...
I am aware that this might be a noob question but please tell me where I can get more info. Thanks for your support!
@plamere commented on GitHub (Nov 28, 2014):
You need to make sure that the URL you have used for the SPOTIPY_REDIRECT_URI
variable exactly matches the URL you have specified in your REDIRECT_URI
section of your application. You set this at
https://developer.spotify.com/my-applications/#!/applications
On Fri, Nov 28, 2014 at 1:06 AM, Killer1337 notifications@github.com
wrote: