Keep getting status error 401

rate-limits
tweepy

#1

I have developed a twitter application that get the 100 tweets of a user and i am making 100 GET request per 15 min window as per twitter guidelines (https://dev.twitter.com/rest/public/rate-limiting) but i am still getting an error 401. I am posting the error output below.

Traceback (most recent call last):
  File "locations.py", line 185, in <module>
    test = api.user_timeline(int(p['id_str']),count=100)
  File "/usr/local/lib/python3.4/dist-packages/tweepy/binder.py", line 243, in _call
    return method.execute()
  File "/usr/local/lib/python3.4/dist-packages/tweepy/binder.py", line 227, in execute
    raise TweepError(error_msg, resp)
tweepy.error.TweepError: Twitter error response: status code = 401

#2

Error was when twitter was returning data (thats is the requested 100 tweets) it was returning a blank tweet (user must have deleted that tweet) which was the cause of error. Make sure u guys catch such cases.


#3