title: tweepy wait_on_rate_limit not working
body: <p>So, first off, I realize there's a number of questions regarding handling the twitter rate limits. I have no idea why, but none of the ones's I've found so far work for me. </p>
  
  <p>I'm using tweepy. I'm trying to get a list of all the followers of the followers of a user. As expected, I can't pull everything down all at once due to twitter's rate limits. I have tweepy v 3.5 installed and thus am referring to <a href="http://docs.tweepy.org/en/v3.5.0/api.html" rel="nofollow">http://docs.tweepy.org/en/v3.5.0/api.html</a>. To get the list of followers of the originating user I use:</p>
  
  <pre><code>auth = tweepy.OAuthHandler(consumer_key,consumer_secret)
  auth.set_access_token(access_token, access_secret)
  api = tweepy.API(auth)
  
  followerIDs = []
  for page in tweepy.Cursor(api.followers_ids, screen_name=originatingUser, wait_on_rate_limit = True, wait_on_rate_limit_notify = True).pages():
      followerIDs.extend(page)
  </code></pre>
  
  <p>followers = api.lookup_users(follower)</p>
  
  <p>This works a for a bit but quickly turns into:</p>
  
  <pre><code>tweepy.error.TweepError: [{u'message': u'Rate limit exceeded', u'code': 88}]
  </code></pre>
  
  <p>My theory, would then to retrieve the followers of each user for each followerID using something like this: </p>
  
  <pre><code>for followerID in followerIDs:
          for page in tweepy.Cursor(api.followers_ids, id=followerID, wait_on_rate_limit = True, wait_on_rate_limit_notify = True).pages():
                  followerIDs.extend(page)
  </code></pre>
  
  <p>The other problem I have is when I'm trying to look up the user names. For this, It use the grouper function from itertools to break the followers up into groups of 100 (api.lookup_users can only accept 100 id's at a time) and use</p>
  
  <pre><code>followerIDs = grouper(followerIDs,100)
  for followerGroup in followerIDs:
          followerGroup=filter(None, followerGroup)
          followers = api.lookup_users(followerGroup,wait_on_rate_limit = True)
          for follower in followers:
                  print (originatingUser + ", " + str(follower.screen_name))
  </code></pre>
  
  <p>That gets a different error, namely:</p>
  
  <pre><code> TypeError: lookup_users() got an unexpected keyword argument 'wait_on_rate_limit'
  </code></pre>
  
  <p>which I'm finding confusing, becuase the <a href="http://docs.tweepy.org/en/v3.5.0/api.html#tweepy-api-twitter-api-wrapper" rel="nofollow">tweepy api suggests</a> that that should be an accepted argument.</p>
  
  <p>Any ideas as to what I'm doing wrong?</p>
  
  <p>Cheers
  Ben.</p>