In redis-py < 3.0, redis.Redis.spop() takes only two arguments which are self and name. But self.fetch_data(self.redis_key, self.redis_batch_size) applies self and two other arguments to self.fetch_data which is redis.Redis.spop() indeed. This could cause an error TypeError: spop() takes 2 positional arguments but 3 were given
In redis-py < 3.0,
redis.Redis.spop()
takes only two arguments which areself
andname
. Butself.fetch_data(self.redis_key, self.redis_batch_size)
appliesself
and two other arguments to self.fetch_data which isredis.Redis.spop()
indeed. This could cause an errorTypeError: spop() takes 2 positional arguments but 3 were given