New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpotifyOAuth Object not prompting user authorization (version 2.13.0) #533
Comments
I was able to prompt user authorization by calling Still, I am curious as to why I can't replicate the code from the docs example. I will paste the code which worked for me below in hopes it will help.
|
I agree that doesn't seem to behave correctly. I see at least two things that we need to fix:
|
It looks like the SpotifyOAuth class initializes both cache_path and username, but username also looks for an environment variable "client_username". Not entirely sure if this is what is causing the error to be raised
|
I recently stumbled into the same issue and this worked for me but there is definitely something going wrong with SpotifyOAuth. |
The exception is being thrown from here. The reason is because The only reason I can see having need to specify a username is to differentiate cache files in multi-user environments.
|
@DJSdev totally agree, let's do 1 & 2! |
I'm currently trying to run the example for the Authorization Code Flow from the docs:
I can create the Spotify API client object but
SpotifyOAuth
never prompts user access.When I go to run
results = sp.current_user_saved_tracks()
I get the error:spotipy.oauth2.SpotifyOauthError: You must either set a cache_path or a username.
I'm not sure if the issue is with the Authorization Code Flow or something on my end.
The text was updated successfully, but these errors were encountered: