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

ValueError: Failed to get link from Spotify playlist URI #22

Open
kaefert opened this issue May 8, 2020 · 3 comments
Open

ValueError: Failed to get link from Spotify playlist URI #22

kaefert opened this issue May 8, 2020 · 3 comments

Comments

@kaefert
Copy link

kaefert commented May 8, 2020

Ripping playlist URIs doesn't seem to work for me:

Exception in thread SpotifyRipperThread:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/spotify_ripper-2.9.1-py2.7.egg/spotify_ripper/ripper.py", line 232, in run
    tracks = list(get_tracks_from_uri(uri))
  File "/usr/local/lib/python2.7/dist-packages/spotify_ripper-2.9.1-py2.7.egg/spotify_ripper/ripper.py", line 225, in get_tracks_from_uri
    return self.load_link(uri)
  File "/usr/local/lib/python2.7/dist-packages/spotify_ripper-2.9.1-py2.7.egg/spotify_ripper/ripper.py", line 428, in load_link
    link = self.session.get_link(uri)
  File "/usr/lib/python2.7/dist-packages/spotify/session.py", line 376, in get_link
    return spotify.Link(self, uri=uri)
  File "/usr/lib/python2.7/dist-packages/spotify/link.py", line 73, in __init__
    'Failed to get link from Spotify URI: %r' % uri)
ValueError: Failed to get link from Spotify URI: 'https://open.spotify.com/playlist/...
@kaefert
Copy link
Author

kaefert commented May 8, 2020

ah okey I found it works if I replace
https://open.spotify.com/playlist/
with
spotify:user:username:playlist:

@lavolp3
Copy link
Owner

lavolp3 commented May 8, 2020

I have already implemented a function to convert the URL to the uri, but I may have missed the fact that for playlists there is a "user" part.
Thanks for raising. For now please use the uri

@lavolp3
Copy link
Owner

lavolp3 commented May 8, 2020

It's a bit odd. In 2018 spotify changed the uris to the shorter uris not including the username. But pyspotify still seems to work with the old links. That's a problem.

Only supports the case to move completely from pyspotify to spotipy.

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

2 participants