BasioMeusPuga / twitchy

CLI streamlink wrapper for twitch.tv
GNU General Public License v3.0
91 stars 14 forks source link

TypeError: 'NoneType' object is not subscriptable #8

Closed lasers closed 7 years ago

lasers commented 7 years ago

Hi. I was following an example from twitchy/blob/master/README.md

Watch specified channel(s) - Do not have to be in local database:

$ twitchy -w northernlion cobaltstreak
Checking channels...
The Binding of Isaac: Afterbirth
1 northernlion                5757               Egg
Channel number(s): 1
1d [lasers:~/src/twitchy] master ± ./twitchy.py -w northernlion cobaltstreak
 Checking 2 channel(s)...
 The Binding of Isaac: Afterbirth
 1 CobaltStreak           1,309       200-0 Eden streaks. LETS GO
 Channel number(s)? 1
 q / Ctrl + C to quit 
 Now watching:                                                                                                                                         
 CobaltStreak | High                                                                                                                                   
Traceback (most recent call last):                                                                                                                     
  File "./twitchy.py", line 1353, in <module>
    main()
  File "./twitchy.py", line 1341, in main
    watch(args.w, 'w')
  File "./twitchy.py", line 990, in watch
    playtime_instances(final_selection)
  File "./twitchy.py", line 1142, in playtime_instances
    playtime_instance[count].play()
  File "./twitchy.py", line 1063, in play
    uses_aq = database.execute("SELECT AltQuality FROM channels WHERE Name = '{0}'".format(self.final_selection)).fetchone()[0]
TypeError: 'NoneType' object is not subscriptable
BasioMeusPuga commented 7 years ago

Hey.

It seems like an exception block wasn't getting triggered. What's weird is that I remember checking for this exact thing when I first wrote it. Something evil is afoot.

Should be fixed now though.

lasers commented 7 years ago

Works okay now in latest master / fixed via commit e1eaa35. Many thanks. :-)