IdIterator fix TypeError: _call() got multiple values for keyword argument 'max_id'.
authorAndrei Petre <p31andrei@gmail.com>
Mon, 9 Jun 2014 23:29:22 +0000 (02:29 +0300)
committerAndrei Petre <p31andrei@gmail.com>
Mon, 9 Jun 2014 23:29:22 +0000 (02:29 +0300)
The problem is that max_id is passed in self.method as param but also
kept in kargs. Doing a kargs.pop with None as default value for 'max_id'
solves the problem as not keeping 'max_id' in two places anymore.

tweepy/cursor.py

index 1a08cd8c0b6c5900d51fbb9add16aad8e00817d7..faa35158b6d3a8095e5a5fbfb2b8f4aeba65cdb7 100644 (file)
@@ -84,7 +84,7 @@ class IdIterator(BaseIterator):
 
     def __init__(self, method, args, kargs):
         BaseIterator.__init__(self, method, args, kargs)
-        self.max_id = kargs.get('max_id')
+        self.max_id = kargs.pop('max_id', None)
         self.num_tweets = 0
         self.results = []
         self.model_results = []