Open oliviertremblay opened 5 days ago
Thanks, saved my day! Had to edit the spotify_backup.py in the package and worked like a charm.!
I have the same issue, I can't back up my playlist from spotify. How do I do what you've said?
@oliviertremblay had the same thanks.
@tenasd depends on your OS. You need to find the spotify_backup.py
file and make the change above.
On linux ran the find command in my user dir and got one result:
$ find . -name spotify_backup.py
./.local/share/pipx/venvs/spotify2ytmusic/lib/python3.12/site-packages/spotify2ytmusic/spotify_backup.py
Editted that file and re-ran the s2yt_gui
command
For windows the "spotify_backup.py" file is located in
C:\Users\YourUserName\AppData\Local\Programs\Python\Python312\Lib\site-packages\spotify2ytmusic
As OP - edit line 155/156 - mine didn't work at first as it had a trailing ) - so be aware of that. Once I fixed that it backed up my playlists no problem
Thanks for replying @TaZ4444 I DMed the project owner on reddit so that he may approve the PR I raised that fixes the problem.
The problem happens when trying to backup from spotify and trying to reach the endpoint that returns liked tracks for a user. When I looked in the Spotify docs, the endpoint was different than the one specified in the code.
To solve the issue:
In spotify_backup.py at line 155, I replaced the endpoint from
_liked_tracks = spotify.list( "users/{user_id}/tracks".format(user_id=user_idescaped), {"limit": 50} )
to
_likedtracks = spotify.list("me/tracks", {"limit": 50})
Based on the documentation found here: https://developer.spotify.com/documentation/web-api/reference/get-users-saved-tracks