正在运行python脚本,该脚本通过jenkins发出url请求,从而引发这些错误。
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
还有
urllib.error.URLError: <urlopen error [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>
Build step 'Windows PowerShell' marked build as failure
Finished: FAILURE
正在运行的脚本是:
import urllib.request
url_string = "http://www.google.com/"
reader = urllib.request.urlopen(url_string )
for data in reader:
print(data)
此脚本可以正常执行IDLE。
请帮助解决此问题。