johnwmillr / LyricsGenius

Download song lyrics and metadata from Genius.com 🎶🎤
http://www.johnwmillr.com/scraping-genius-lyrics/
MIT License
898 stars 159 forks source link

"TypeError: 'NoneType' object is not subscriptable" #137

Closed cfregly closed 4 years ago

cfregly commented 4 years ago

Describe the bug

lyricsgenius 1.8.4

Searching for songs by Andy Shauf...

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-11-8927ac85ef21> in <module>()
----> 1 artist = genius.search_artist('Andy Shauf', max_songs=3, sort='title')
      2 print(artist.songs)

~/anaconda3/envs/python3/lib/python3.6/site-packages/lyricsgenius/api.py in search_artist(self, artist_name, max_songs, sort, per_page, get_full_info, allow_name_change, artist_id)
    319 
    320         artist_info = self.get_artist(artist_id)
--> 321         found_name = artist_info['artist']['name']
    322         if found_name != artist_name and allow_name_change:
    323             if self.verbose:

TypeError: 'NoneType' object is not subscriptable

Expected behavior Write a clear and concise description of what you expected to happen.

To Reproduce Describe the steps required to reproduce the behavior.

  1. Step one...
  2. Step two...

Include the error message associated with the bug.

Version info

Additional context Add any other context about the problem here.

cfregly commented 4 years ago

was using the wrong access key. fixed.

ghost commented 4 years ago

hahah me too :)