When attempting to iterate through videos as in #3 I'm getting a TypeErrror.
import twitch
helix = twitch.Helix('<client-id>')
for video in helix.user('moonmoon_ow').videos():
print(video.id)
which yields
File "c:\Users\yanns\git\Twitch-Python\debug-twitch.py", line 5, in <module>
for video in helix.user('moonmoon_ow').videos():
File "c:\Users\yanns\git\Twitch-Python\twitch\helix\resources\resource.py", line 53, in __iter__
remaining = 0 if remaining is not None and len(elements) > remaining else remaining - self._kwargs['first']
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
it seems like there might be some invalid boolean logic? From my debugging the variable remaining is indeed None so the if statement immediately fails and the else statement is evaluated. since remaining is None however we get a TypeError trying to subtract an int from a NoneType.
When attempting to iterate through videos as in #3 I'm getting a
TypeErrror
.which yields
it seems like there might be some invalid boolean logic? From my debugging the variable
remaining
is indeedNone
so the if statement immediately fails and the else statement is evaluated. sinceremaining
isNone
however we get aTypeError
trying to subtract anint
from aNoneType
.Am I using the videos() method as intended?