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

IndexError: list index out of range on ['songs'][0]['audio_summary'] #4

Open
LunkRat opened this issue May 23, 2012 · 2 comments
Open

Comments

@LunkRat
Copy link

LunkRat commented May 23, 2012

Occasionally I am hitting this error:

File "/usr/local/lib/python2.7/dist-packages/pyechonest-4.2.21-py2.7.egg/pyechonest/song.py", line 109, in get_audio_summary
self.cache['audio_summary'] = response['songs'][0]['audio_summary']
IndexError: list index out of range

@stowell
Copy link
Member

stowell commented May 23, 2012

Sounds like you're not getting any results for this particular song. Commit aa39f00 should guard against this error. Thanks for sending this along!

@LunkRat
Copy link
Author

LunkRat commented May 23, 2012

Nice, thanks for the quick commit. I figured that it just needed to be wrapped in an if ... there was a similar error that I saw that was a KeyError because it was calling some key from a dict that wasn't there. I will post an issue with more details if I see it again.

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