mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #1199] Possible incorrect parameter for SpotifyPKCE.get_acces_token() #705
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#705
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 @AnshulPatil29 on GitHub (May 15, 2025).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1199
Question
When reviewing the
SpotifyPKCEimplementation inspotipy.oauth2oauth.py I see:There is no **kwargs to accept additional parameters, yet the core Spotify client client.py calls :
Should the PKCE manager’s get_access_token signature be updated (e.g. to include **kwargs or an as_dict parameter) to match the client’s expectations, or is there another intended mechanism to handle these extra arguments?
I had some errors when trying the code earlier but it was due to bad gateway in the traceback, but patching this in code caused the errors to go away which makes me uncertain about if this is handled currently or causes a bug elsewhere.
@dieser-niko commented on GitHub (May 15, 2025):
It seems that someone has already thought of this. However, I don't really approve of this method. There's actually a try-except block in the client.py file to catch a
TypeError. Then it attempts to use theget_access_tokenfunction with no parameters.@stephanebruckert how about removing the parameter
as_dictfrom every function? It has been marked as deprecated for quite a long time.@stephanebruckert commented on GitHub (May 19, 2025):
@AnshulPatil29 without stack trace It's hard to tell where any error was raised. Can you please provide one?
If you "unpatch" it, is the error coming back?
@dieser-niko it looks like that was done in v3 already
github.com/spotipy-dev/spotipy@c8e045891b@AnshulPatil29 commented on GitHub (Jun 11, 2025):
@stephanebruckert I am unsure where the error was raised exactly, but it ceased to exist upon clearing my pip cache and reinstalled. As far as I remember it was surely an error due to the
as_dictparameter. Closing the issue now as it seems to have been addressed in a prior version. Thank you.