Describe the bug
I'm following the example in Python exactly, but it gives a NoneType error which I can't get rid of.
Expected behavior
Expect title of Andy Shauf songs to be printed
To Reproduce
Describe the steps required to reproduce the behavior.
import lyricsgenius
genius = lyricsgenius.Genius("my_client_access_token_here")
artist = genius.search_artist("Andy Shauf", max_songs=3, sort="title") <-- error at this line
print(artist.songs)
Error Message
Searching for songs by Andy Shauf...
TypeError Traceback (most recent call last)
in
1 genius = lyricsgenius.Genius("my_client_access_token_here")
----> 2 artist = genius.search_artist("Andy Shauf", max_songs=3, sort="title")
3 print(artist.songs)
~/.local/lib/python3.7/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
**Version info**
- Package version lyricsgenius: latest
- OS: Windows
Describe the bug I'm following the example in Python exactly, but it gives a NoneType error which I can't get rid of.
Expected behavior Expect title of Andy Shauf songs to be printed
To Reproduce Describe the steps required to reproduce the behavior. import lyricsgenius genius = lyricsgenius.Genius("my_client_access_token_here") artist = genius.search_artist("Andy Shauf", max_songs=3, sort="title") <-- error at this line print(artist.songs)
Error Message Searching for songs by Andy Shauf...
TypeError Traceback (most recent call last)