0
我正在使用Tweepy在Python3中编写Twitter流监听器。我在流式播放一段时间后出现此错误:绕过IncompleteRead异常
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
我该如何绕过这个,重新连接并继续?
我做:
from requests.packages.urllib3.exceptions import ReadTimeoutError, IncompleteRead
和:
while True:
try:
twitter_stream.filter(track=keywordlist, follow=userlist)
except IncompleteRead:
continue
但仍然得到错误。
当然!谢谢!我只是在按下按钮发布问题时才注意到。 – textnet