连接问题错误

时间:2018-01-16 18:42:43

标签: python

我运行一个运行了几个小时的Python脚本,然后抛出以下错误。我理解它说明了连接问题,但如果是这种情况,那么连接本身就会在初始运行中失败。有没有办法可以避免这个错误。

 Traceback (most recent call last):
 File "C:\Users\s5331866\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\connection.py", line 141, in _new_conn(self.host, self.port), self.timeout, **extra_kw)
 File "C:\Users\s5331866\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
 File "C:\Users\s5331866\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
 sock.connect(sa)
 TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

0 个答案:

没有答案