[GH-ISSUE #600] 'Address already in use' error when using 'user-top-read' scope #358

Closed
opened 2026-02-27 23:22:11 +03:00 by kerem · 4 comments
Owner

Originally created by @alansberman on GitHub (Oct 30, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/600

I'm using the latest version of spotipy. With a normal scope, e.g.

sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="my_id",client_secret="my_secret",
redirect_uri = "http://localhost:8000/callback/", scope="user-library-read"))

I'm able to make API calls just fine. However, if I add the 'user-top-read' scope (which I'd like to do to get the current_user_top_tracks() etc.), I get the following error for any API call e.g current_user_playlists() on my Flask backend:

OSError: [Errno 48] Address already in use

Obviously, without the 'user-top-read' scope I get a 403. Is there a workaround for this?

Originally created by @alansberman on GitHub (Oct 30, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/600 I'm using the latest version of spotipy. With a normal scope, e.g. ``` sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="my_id",client_secret="my_secret", redirect_uri = "http://localhost:8000/callback/", scope="user-library-read")) ``` I'm able to make API calls just fine. However, if I add the 'user-top-read' scope (which I'd like to do to get the current_user_top_tracks() etc.), I get the following error for _any_ API call e.g current_user_playlists() on my Flask backend: ``` OSError: [Errno 48] Address already in use ``` Obviously, without the 'user-top-read' scope I get a 403. Is there a workaround for this?
kerem 2026-02-27 23:22:11 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Peter-Schorn commented on GitHub (Oct 30, 2020):

This has nothing to do with spotipy. There is another process already using port 8000. You need to find it and kill it. See https://stackoverflow.com/a/19071568

<!-- gh-comment-id:719539297 --> @Peter-Schorn commented on GitHub (Oct 30, 2020): This has nothing to do with spotipy. There is another process already using port 8000. You need to find it and kill it. See https://stackoverflow.com/a/19071568
Author
Owner

@alansberman commented on GitHub (Oct 30, 2020):

This has nothing to do with spotipy. There is another process already using port 8000. You need to find it and kill it. See https://stackoverflow.com/a/19071568

Thanks. I'm not sure why this is only the case when I add the 'user-top-read' scope (as with other scopes I don't have this issue), but have made a workaround.

<!-- gh-comment-id:719558166 --> @alansberman commented on GitHub (Oct 30, 2020): > This has nothing to do with spotipy. There is another process already using port 8000. You need to find it and kill it. See https://stackoverflow.com/a/19071568 Thanks. I'm not sure why this is only the case when I add the 'user-top-read' scope (as with other scopes I don't have this issue), but have made a workaround.
Author
Owner

@Peter-Schorn commented on GitHub (Oct 30, 2020):

When you add another authorization scope, you have to go through the authorization process again. It has nothing to do with the "user-top-read" scope specifically.

<!-- gh-comment-id:719575071 --> @Peter-Schorn commented on GitHub (Oct 30, 2020): When you add another authorization scope, you have to go through the authorization process again. It has nothing to do with the "user-top-read" scope specifically.
Author
Owner

@alansberman commented on GitHub (Oct 30, 2020):

Ah okay I see. Thanks again @Peter-Schorn .

<!-- gh-comment-id:719632898 --> @alansberman commented on GitHub (Oct 30, 2020): Ah okay I see. Thanks again @Peter-Schorn .
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#358
No description provided.