Skip to content

I get 403 when asking audio features #7

@Regis111

Description

@Regis111

Like the title says:

I have setup of application.

In step of choosing song I receive HTTP 403.

python3 src/main.py

**************************************************
Spotify Web API Demo App
**************************************************

Let's get some audio data!  How would you like to choose your tracks:
  1.) Search for a song
  2.) Choose from your playlists
  3.) Pick from your saved songs
Choice: 1

What song would you like to search: around the world daft punk

******************************
Search results for "around the world daft punk"
******************************
  1) Around the World - Daft Punk
  2) Around the World - M.A.W Remix - Daft Punk, Masters At Work
  3) One More Time - Daft Punk
  4) Around the World - Radio Edit [Radio Edit] - Daft Punk
  5) Around the World / Harder, Better, Faster, Stronger - Daft Punk
  6) Hugh Hefner - Lil B
  7) Around The World - Techno Remix - Fyex
  8) around the world (la la la la la) - slowed + reverb - slō, twilight, Tazzy
  9) På promenaden - Markus Krunegård
  10) Around The World (La La La La) - Umur Anil Gokdag, Ascence

Choose a track #, "s" to search again, or "c" to cancel: 1

Great, we have 1 track!  What would you like to see for these tracks:
    1.) Audio Features (High-Level)
    2.) Audio Analysis (Low-Level)
Choice: 1

******************************
Getting Audio Features...
******************************
HTTP Error for GET to https://api.spotify.com/v1/audio-features/?ids=1pKYYY0dkg23sQQXi0Q5zN with Params: {} returned 403 due to None
Traceback (most recent call last):
  File "/home/regis/.local/lib/python3.10/site-packages/spotipy/client.py", line 274, in _internal_call
    response.raise_for_status()
  File "/home/regis/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.spotify.com/v1/audio-features/?ids=1pKYYY0dkg23sQQXi0Q5zN

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/regis/spotify-api-starter/src/main.py", line 285, in <module>
    main()
  File "/home/regis/spotify-api-starter/src/main.py", line 76, in main
    get_audio_features(spotify, selected_tracks, pretty_print=True)
  File "/home/regis/spotify-api-starter/src/main.py", line 105, in get_audio_features
    tracks_features_response = spotify.audio_features(tracks=track_map.keys())
  File "/home/regis/.local/lib/python3.10/site-packages/spotipy/client.py", line 1802, in audio_features
    results = self._get("audio-features/?ids=" + ",".join(tlist))
  File "/home/regis/.local/lib/python3.10/site-packages/spotipy/client.py", line 324, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/home/regis/.local/lib/python3.10/site-packages/spotipy/client.py", line 294, in _internal_call
    raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 403, code: -1 - https://api.spotify.com/v1/audio-features/?ids=1pKYYY0dkg23sQQXi0Q5zN:
 None, reason: None
make: *** [makefile:17: run] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions