TweepError:发送失败的请求:[错误61]拒绝连接
问题描述:
安装OSX 10.7.4,Eclipse的Pydev的,Python 2.7版,Tweepy-1.9TweepError:发送失败的请求:[错误61]拒绝连接
嘿,我本来想抓住从Twitter的API鸣叫,但不断收到如下相同的错误。这个程序旨在打印Twitter API速率限制,以确保我没有结束。
我不断收到此错误,但网上有很少的信息。
任何帮助表示赞赏。
守则
import tweepy
auth = tweepy.OAuthHandler(Consumer Key, Consumer Secret)
auth.set_access_token(Access token,Access token secret)
api = tweepy.API(auth)
print api.rate_limit_status()
#print tweepy.api.rate_limit_status()
的错误
Traceback (most recent call last):
File "/Users/brendan/Documents/workspace/Euro2012/src/rate_limit.py", line 7, in <module>
print api.rate_limit_status()
File "build/bdist.macosx-10.5-fat3/egg/tweepy/binder.py", line 185, in _call
File "build/bdist.macosx-10.5-fat3/egg/tweepy/binder.py", line 149, in execute
tweepy.error.TweepError: Failed to send request: [Errno 61] Connection refused
编辑:我对这个没有确认的,但是我怀疑问题是代理设置
答
phihag以上是正确的。标准版本的Tweepy没有HTTP支持。然而,有一个由DUCU创建的版本(1.7.3),可以在这里下载GitHub,这显然确实有一些修改HTTP支持。我不得不使用最新版本(1.9),因为我有过时的库问题。
正如phihag所建议的,我的解决方案是使用另一种互联网连接。
看看Tweepy的未来版本是否会支持HTTP会很有趣。
关键字(用于其他搜索者)Tweepy API http代理支持。