mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 08:35:49 +03:00
[GH-ISSUE #361] Issue with _get_access_token #212
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#212
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 @amc40 on GitHub (Mar 17, 2019).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/361
Even when provided with a valid code the response status code will still be 200, causing a spotipy.oauth2.SpotifyOauthError: Bad Request error. Using the pycharm debugger I stepped into the code and saw that the response had a valid authentication code and reason = OK, however the response code was still 200 (see attached screenshot). Unless this is a design choice I would suggest that it could possibly be fixed by checking instead that the status_code was not 'OK'.

@FryPhilip commented on GitHub (Apr 16, 2019):
Hey, I get the same error. Same 200 code and OK string as reason. How did you fix that? Nothing I tried would fix that.
I tried adding the 'enable shuffle' function but at line 76 in oath2.py
(raise SpotifyOauthError(response.reason)
the debug triggers. error code is:
spotipy.oauth2.SpotifyOauthError: OK
and the method I added to client.py
def player_shuffle(self, state=None):
return self._put('me/player/shuffle', state=state)
Edit: never mind, the pycharm library wasn't updated, just download it from this GitHub and replace the files in your project
@stephanebruckert commented on GitHub (Jan 13, 2020):
Fixed by 2.5.0