Capture TypeError

This commit is contained in:
Ritiek Malhotra
2017-06-16 16:39:47 +05:30
committed by GitHub
parent 24636d2d47
commit 4547ef7e71

View File

@@ -261,7 +261,7 @@ def grab_list(file):
global spotify
spotify = spotipy.Spotify(auth=token)
grab_single(raw_song, number=number)
except (urllib2.URLError, IOError):
except (urllib2.URLError, TypeError, IOError):
lines.append(raw_song)
misc.trim_song(file)
with open(file, 'a') as myfile: