Twitter Timeouts?

python
tweepy

#1

When I run Twitter API code through Python using Tweepy, after a few hours of the code running I get an error message:

tweepy.error.TweepError: Failed to send request: HTTPSConnectionPool(host='api.twitter.com', port=443): Read timed out. (read timeout=60)

It seems Twitter has a timeout limit that stops access after a certain point? Or not? Is this a Twitter API issue, or a python one?


#2

Good question. If you’re not getting an error code back from api.twitter.com then the chances are this is a network, HTTP stack, or Python issue. Is there any way for you to enable any more detailed logging?


#3

I’m not sure…Here is the full message:

  Traceback (most recent call last):
      File "file.py", line 348, in <module>
        searchFollowers(screenName)
      File "file.py", line 169, in searchFollowers
        for follower in client.lookup_users(user_ids=ids[i:i+batchAmount]):
      File "build/bdist.macosx/egg/tweepy/api.py", line 321, in lookup_users
      File "build/bdist.macosx/egg/tweepy/binder.py", line 239, in _call
      File "build/bdist.macosx/egg/tweepy/binder.py", line 189, in execute
    tweepy.error.TweepError: Failed to send request: ('Connection aborted.', error(54, 'Connection reset by peer'))