mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #163] Clearing Cache for util.prompt_for_user_token( ) #81
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#81
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 @rymc9384 on GitHub (Feb 16, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/163
TL;DR: If you could have the
util.prompt_for_user_token()function -- or thespotipy.Spotify(auth=token)function clear the cache created for authorization, that would be super helpful. Either removing the file entirely or being able to write over it w/o appending should work.Longer Version:
I ran into an issue with getting the authorization to work, even though it had worked last night.
I was getting an error from the scope argument about not being able to split a None type, even when scope was set as a string. The error came from the
_is_scope_subset()function in SpotifyOauth class.I realized that the cache from last night was still there, and upon removing it my code magically worked again. Suggested fix is discussed above in the TL;DR section.
Thanks for all your work!
@jonascj commented on GitHub (Mar 31, 2017):
For anyone else wondering where this cache file is its alongside your python script called
.cache-username, i.e. it is hidden on Linux. I missed it because I only didls -lwhile looking for it.@stephanebruckert commented on GitHub (Jun 26, 2021):
Closing as wontfix as
util.prompt_for_user_token()will be removed in v3