Spotify-Playlist-Generator1 icon indicating copy to clipboard operation
Spotify-Playlist-Generator1 copied to clipboard

Added a fix to issue #2 caused due to Index Error.

Open JaniniRami opened this issue 4 years ago • 2 comments

After some testing, I figured out that the error is caused by an Index error as shown in the below:

    'playlist_img_url': playlist['images'][0]['url'],

    IndexError: list index out of range

I fixed that with a simple try, except condition for Index errors as if the user didn't have a playlist_img_url for whatever reason it will just pass it without any errors in this case (Internal Server Error 500), and go on to try and get the other data.

I have generated my own Spotify client ID and Secret to try it and it works fine now!

Issue Number: #2

JaniniRami avatar Oct 18 '20 06:10 JaniniRami

Just merged this into my copy, works like a champ. Thank you.

HadManySons avatar Nov 23 '20 01:11 HadManySons

Glad to hear that! @HadManySons

JaniniRami avatar Nov 23 '20 04:11 JaniniRami