Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 Token Expired #9

Open
w7rus opened this issue Oct 1, 2024 · 2 comments
Open

401 Token Expired #9

w7rus opened this issue Oct 1, 2024 · 2 comments

Comments

@w7rus
Copy link

w7rus commented Oct 1, 2024

401 Token Expired happens after some time downloading large playlists

Is token refresh implemented? Been told there is a problem with it.

Traceback (most recent call last):
  File "/root/votify/votifyenv/lib/python3.11/site-packages/votify/utils.py", line 8, in check_response
    response.raise_for_status()
  File "/root/votify/votifyenv/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://spclient.wg.spotify.com/metadata/4/track/b77ce85e399e4847ab8a8d7811fef8ac?market=from_token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/votify/votifyenv/lib/python3.11/site-packages/votify/cli.py", line 570, in main
    gid_metadata = downloader.get_gid_metadata(media_id, media_type)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/votify/votifyenv/lib/python3.11/site-packages/votify/downloader.py", line 368, in get_gid_metadata
    return self.spotify_api.get_gid_metadata(gid, media_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/votify/votifyenv/lib/python3.11/site-packages/votify/spotify_api.py", line 126, in get_gid_metadata
    check_response(response)
  File "/root/votify/votifyenv/lib/python3.11/site-packages/votify/utils.py", line 10, in check_response
    _raise_response_exception(response)
  File "/root/votify/votifyenv/lib/python3.11/site-packages/votify/utils.py", line 14, in _raise_response_exception
    raise Exception(
Exception: Request failed with status code 401: Token expired
@Akczht
Copy link

Akczht commented Oct 21, 2024

same issue, though increasing wait interval reduces the frequency of this issue, but tales more time

@youngoris
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants