mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #537] Flask example: OSError: [Errno 48] Address already in use #322
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#322
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 11, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/537
In a few Stack Overflow posts, users are suggesting that a scope like:
scope='user-read-currently-playing playlist-modify-private'will work, however, at least when I add this to [app.py].(https://github.com/plamere/spotipy/blob/master/examples/app.py), it returnsOSError: [Errno 48] Address already in use.Is this because
spotipy.oauth2.SpotifyOAuthis trying to connect two sockets at the same address? Is there a "right" way to do this?@stephanebruckert commented on GitHub (Jul 12, 2020):
Hey @MikeiLL, I can't reproduce this consistently. I was able to reproduce it once, but that's when I realised I had another app (not python) running on the same port. It might also be a problem specific to Flask
Can you make sure you don't have anything running on port 8080:
and then run the script again and only once. Do you still get the same?
Also how are you usually killing your server? Looks like the best way is to use ctrl + c
@stephanebruckert commented on GitHub (Jul 12, 2020):
I was able to reproduce the
OSError: [Errno 48] Address already in useproblem consistently by setting a cache path.I guess you are doing the same?
No idea why this is happening, but I'm investigating
Edit: annd I'm unable to reproduce it again. Is it the same for you, happening a bit randomly?
@MikeiLL commented on GitHub (Jul 12, 2020):
For me, so far, it's consistent. Will report back after a bit more testing. Are you able to include an arbitrary number of scopes, even if inconsistently?
Yes. On OS X and Unix ctrl + c works. On Windows 10 we have been resorting to the Task Manager app, though someone just told me that
alt = f4may work.@stephanebruckert commented on GitHub (Jul 12, 2020):
The error seems to appear when the authentication fails (but shouldn't), and then automatically attempts to use this feature: "Spin up a local webserver to auto-fill authentication URL".
Here is a temporary fix for it https://github.com/plamere/spotipy/pull/539/files, although as described in the PR it still needs some work to auto refresh the tokens