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

HTTP Error for GET to https://api.spotify.com/v1/tracks/[EDITED] with Params: {'market': None} returned 404 due to None #2

Closed
ZemlyakovDmitry opened this issue Apr 7, 2022 · 3 comments

Comments

@ZemlyakovDmitry
Copy link

ZemlyakovDmitry commented Apr 7, 2022

Hi, I got an exception when tried to import an playlist.
Server - Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-1059-kvm x86_64)

Replaced possible sensitive info with [EDITED]

What I did:

  1. Added env variables as said in the FAQ
  2. installed requirements
  3. ran main.py
  4. Allowed access to the account
  5. Pasted URL into the running script

Then I got that exception:

root@zema:~/spotify2yandexmusic# python3 ./src/main.py
Yandex Music API v2.0.1, Copyright (C) 2019-2022 Il`ya (Marshal) <https://github.com/MarshalX>
Licensed under the terms of the GNU Lesser General Public License v3 (LGPLv3)

Enter the URL you were redirected to: https://localhost/?code=[EDITED]
Extracting playlist: [tyt imya playlista]
HTTP Error for GET to https://api.spotify.com/v1/tracks/[EDITED]  with Params: {'market': None} returned 404 due to None
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 245, in _internal_call
    response.raise_for_status()
  File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/tracks/[EDITED]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./src/main.py", line 70, in <module>
    main()
  File "./src/main.py", line 24, in main
    for spotify_playlist in spotify.get_playlists():
  File "/root/spotify2yandexmusic/src/spotify/spotify.py", line 28, in get_playlists
    tracks=self.extract_playlist_tracks(playlist_id)))
  File "/root/spotify2yandexmusic/src/spotify/spotify.py", line 62, in extract_playlist_tracks
    tracks.append(self.extract_track_credentials(item['track']['id']))
  File "/root/spotify2yandexmusic/src/spotify/spotify.py", line 84, in extract_track_credentials
    track = self._client.track(track_id)
  File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 345, in track
    return self._get("tracks/" + trid, market=market)
  File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 297, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 267, in _internal_call
    raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/tracks/[EDITED] t:
 None, reason: None

pls help

@kgrandly
Copy link
Contributor

The problem comes from the Spotify library. Check out the repository for more information.

File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 245, in _internal_call
    response.raise_for_status()

@ythosa
Copy link
Member

ythosa commented Apr 21, 2022

Is this problem relevant if yandex music already supports transferring from spotify ?

@kgrandly
Copy link
Contributor

kgrandly commented Apr 21, 2022

Many people have the same issue.

This issue can be closed, I think.

@ythosa ythosa closed this as completed Apr 21, 2022
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