mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #470] Writing cache file requires code to be run in administrator mode - Windows 10 #276
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#276
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 @ghost on GitHub (Apr 12, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/470
When I run the default code
On Windows 10, I get the warning: 'Couldn't write token to cache at: %s'...
When I ran the pycharm IDE in administrator mode, it worked, I thought this could be fixed by manually defining a cache_path parameter of the util.prompt_for_user_token function to a location that I could write without administrator mode, but defining the cache_path always throws me the following trace:
I was thinking about submitting a pull request that when the cache_path is an empty/non-existing file, it could create it. Is that okay for you?
@stephanebruckert commented on GitHub (Apr 12, 2020):
Have you also tried running your
cmd.exein administrator mode?@ghost commented on GitHub (Apr 12, 2020):
It also does work, but what do you think about the option of creating the file on the cache_path, so the administrator mode is not required? I'm willing to do that if you accept it.
@stephanebruckert commented on GitHub (Apr 13, 2020):
I think you are referring to this particular problem https://github.com/plamere/spotipy/issues/176#issuecomment-307632735 where it won't work if you run
util. prompt_for_user_tokentwice. It should work however if you delete your cached token manually and then run the code again. I agree that it's not OK and if you can solve this in a PR it's definitely welcome! 🙏@ghost commented on GitHub (Apr 14, 2020):
So I was trying to replicate the error you referenciated, and had no success on it, I think this problem has already been solved.
And for some reason, I also cannot replicate my own error either, so I guess we can close this issue.
Thank you for your help.