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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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

wants to merge 1 commit into from

Conversation

JaniniRami
Copy link

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 JaniniRami closed this Oct 18, 2020
@JaniniRami JaniniRami deleted the tmp-branch branch October 18, 2020 07:04
@JaniniRami JaniniRami restored the tmp-branch branch October 18, 2020 07:44
@JaniniRami JaniniRami reopened this Oct 18, 2020
@HadManySons
Copy link

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

@JaniniRami
Copy link
Author

Glad to hear that! @HadManySons

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

Successfully merging this pull request may close these issues.

3 participants