mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #530] Empty calls to currently_playing, current_user_playing_track raise an exception: #316
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#316
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 @MikeiLL on GitHub (Jul 6, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/530
Playing with App.py:
And here's the whole stack:
Am expecting that I should be sending some other argument
@stephanebruckert commented on GitHub (Jul 6, 2020):
You have
SCOPE=None?@MikeiLL commented on GitHub (Jul 6, 2020):
Correct. And Duh! It needs to be
user-read-currently-playing.I'm a little unclear on where to look for how to handle tokens. Would the app, potentially store (and when necessary replace) different tokens for different tasks?
Does the request only accept a single scope at a time?
@MikeiLL commented on GitHub (Jul 6, 2020):
This is interesting. When I run the example with a the main scope as
user-read-currently-playing, it returns an Address Already in Use error and look, it seems to, indeed, be running twice on the same port:Update
But that's not what's causing the error, as it runs two threads with a
scopeofNoneas well, which doesn't give the same error.@MikeiLL commented on GitHub (Jul 7, 2020):
The cause of this problem is that there needs to be, if I am understanding correctly, a new
spotipy.oauth2.SpotifyOAuthfor each new scope.I am seeing that multiple scopes is possible, but I'm not sure what that would look like.
In my case, so far, I only need a single scope, so once I logged out, I was able to instantiate the single
spotipy.oauth2.SpotifyOAuthwith the required scope.I wonder if the demo,
app.py, should be one that includes a specific scope, for example:If that seems useful, I'll be happy to send a pr.
@stephanebruckert commented on GitHub (Jul 12, 2020):
Answered the multiple scopes issue here https://github.com/plamere/spotipy/issues/537 – I don't think it needs a different
spotipy.oauth2.SpotifyOAuthfor each scopeAnswered to you about the "missing cache or username" problem here https://github.com/plamere/spotipy/pull/529#issuecomment-657185855 – you were right, something is wrong. For that problem we can use this issue https://github.com/plamere/spotipy/issues/533
I agree the script could show an example that uses scopes (just one or multiple), please do open a PR if you get this working!
@stephanebruckert commented on GitHub (Jul 12, 2020):
@MikeiLL do you still have the "permissions missing" issue or can we close the current issue and focus on https://github.com/plamere/spotipy/issues/537 only?
@MikeiLL commented on GitHub (Jul 12, 2020):
Closing this one, as the problem was setting
scopetoNone, when making requests that requireuser-read-currently-playing(i think there's a second scope that also grants permissions forcurrent_user_playing_track.)