You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just tried adding my YouTube playlist to Spotify but the program kept crashing at a certain song.
Due to tracks not being found.
My Playlist ID: PLIC0u39_FdlMOtIwmwMNimn4r35Wy2Pc6
StackTrace
Traceback (most recent call last): File "C:\youtubetospotify-master\main.py", line 21, in <module> main() File "C:\youtubetospotify-master\main.py", line 14, in main song_uri = sp.get_song_uri(song.artist, song.title) File "C:\youtubetospotify-master\spotify.py", line 67, in get_song_uri items = results['tracks']['items'] KeyError: 'tracks'
Quick fix:
Added try, except block inside get_song_uri function
The text was updated successfully, but these errors were encountered:
I was able to reproduce the same error. It was caused by a 404 response from the server which my program didn't handle at all.
I have handled that error now. You can now try to run the updated version of program now. Although it had problems parsing most of the songs in the beginning, it managed to add most of the songs later on.
Just tried adding my YouTube playlist to Spotify but the program kept crashing at a certain song.
Due to tracks not being found.
My Playlist ID: PLIC0u39_FdlMOtIwmwMNimn4r35Wy2Pc6
StackTrace
Traceback (most recent call last): File "C:\youtubetospotify-master\main.py", line 21, in <module> main() File "C:\youtubetospotify-master\main.py", line 14, in main song_uri = sp.get_song_uri(song.artist, song.title) File "C:\youtubetospotify-master\spotify.py", line 67, in get_song_uri items = results['tracks']['items'] KeyError: 'tracks'
Quick fix:
Added try, except block inside get_song_uri function
The text was updated successfully, but these errors were encountered: