Open CAAAR12 opened 4 years ago
Hey @CAAAR12,
This works for me but I'm not using Windows. It looks like a bunch of issues are being discovered on Windows only recently. Any chance you can help find which version of spotipy was fine for your problem?
Please follow this https://github.com/plamere/spotipy/issues/493#issuecomment-631103985, looking forward to your help on this
Hey @CAAAR12, This works for me but I'm not using Windows. It looks like a bunch of issues are being discovered on Windows only recently. Any chance you can help find which version of spotipy was fine for your problem? Please follow this #493 (comment), looking forward to your help on this
Thanks @stephanebruckert for the quick response. I just downgraded to 2.11.2 per your recommendation (I tried 2.11.0 first but it defaulted install 2.11.2) and its working great now. As for the solution to why , I haven't seen the changes from 2.11 to 2.12 yet. I'm curious to know the solution. Many thanks!!!
This is very strange, I see nothing from the changes from 2.11.2 to 2.12.0 that could explain that problem. Can you try 2.12.0 again?
Interesting.... uninstalled 2.11.2 and installed 2.12.0 and seems to work again still... Last night I uninstalled and reinstalled 2.12.0 multiple times and it was failing every time :/
Maybe it has to do with some sort of cache being saved in 2.11.2? Unless uninstalling the package removes the caches associated as well. I'm not proficient enough sorry.
Hi I'm running into a similar issue but when trying to get use an auth code to get a token. Please see code below spotipy version = 2.11.1
client_id = 'REDACTED'
client_secret = 'REDACTED'
redirect_uri = 'http://127.0.0.1:9091'
scope = 'user-read-recently-played'
username='REDACTED'
code = 'REDACTED'
sp_oauth = oauth2.SpotifyOAuth(client_id,client_secret,redirect_uri,scope,username)
print(sp_oauth.get_access_token(code, as_dict=False, check_cache=False))
returns a
/usr/local/lib/python3.7/site-packages/spotipy/oauth2.py in get_access_token(self, code, as_dict, check_cache)
423 )
424 if response.status_code != 200:
--> 425 raise SpotifyOauthError(response.reason)
426 token_info = response.json()
427 token_info = self._add_custom_values_to_token_info(token_info)
SpotifyOauthError: Bad Request
any help is greatly appreciated.
Hello, I have the latest release (2.12.0). I was running the example to list tracks and artist name just to pass client authentication variables (ID, secret) and redirect_uri as strings directly from the code instead of my environment variables as a quick test. However when I run, I get the traceback shown at the bottom. I can sign into Spotify and get redirected to the uri normally (authentication successful), but I can't seem to get the post successful for the access token from the function get_access_token.
I verified both Client ID and Client Secret match the Spotify developer ones
The redirect uri I specified on Spotify developer is http://localhost:8001, which also matches my passed string in the code.
"Authorization Code" passed in the payload matches the code in redirect_uri.
Not familiar with b64 and ascii decoding, so I can't verify if the heading is correct. Based on the Client ID and Client Secret matching Spotify developer I would assume it is correct.
Any ideas what I'm doing wrong or if it's a bug? Help would be appreciated! Thank you for providing this!!!!
(I used some print lines to verify some of the payload inputs, which is why it point to line 445. On the stock, it should show line 436.)
My Code: