---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-24-d4d4b59d28a5> in <module>()
1 for artist in unpopular_artists:
----> 2 display_artist_image(artist)
<ipython-input-18-08aea5ed42f7> in display_artist_image(artist)
1 def display_artist_image(artist):
----> 2 display_image(artist['images'][0]['url'])
IndexError: list index out of range
> [0;32m<ipython-input-18-08aea5ed42f7>[0m(2)[0;36mdisplay_artist_image[0;34m()[0m
[0;32m 1 [0;31m[0;32mdef[0m [0mdisplay_artist_image[0m[0;34m([0m[0martist[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0m
[0m[0;32m----> 2 [0;31m [0mdisplay_image[0m[0;34m([0m[0martist[0m[0;34m[[0m[0;34m'images'[0m[0;34m][0m[0;34m[[0m[0;36m0[0m[0;34m][0m[0;34m[[0m[0;34m'url'[0m[0;34m][0m[0;34m)[0m[0;34m[0m[0m
[0m
ipdb> dir()
['artist']
ipdb> artist
{'external_urls': {'spotify': 'https://open.spotify.com/artist/16yXrzdQsBFRalQjN7Wk6t'}, 'href': 'https://api.spotify.com/v1/artists/16yXrzdQsBFRalQjN7Wk6t', 'type': 'artist', 'name': 'Lil Chewy', 'images': [], 'followers': {'href': None, 'total': 0}, 'uri': 'spotify:artist:16yXrzdQsBFRalQjN7Wk6t', 'genres': [], 'id': '16yXrzdQsBFRalQjN7Wk6t', 'popularity': 0}
ipdb> artist['images'][0]['url']
*** IndexError: list index out of range
ipdb> artist['images'][0]
*** IndexError: list index out of range
ipdb> artist['images']
[]
ipdb> artist['name']
'Lil Chewy'
ipdb> continue
Want to hear when I release new things? My infrequent and sporadic newsletter can help with that.