2018-04-2017:14:27|RF5MR:ConnectionError!Traceback(most recent call last):File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/urllib3/connectionpool.py",line601,inurlopenchunked=chunked)File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/urllib3/connectionpool.py",line387,in_make_requestsix.raise_from(e,None)File"",line2,inraise_fromFile"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/urllib3/connectionpool.py",line383,in_make_requesthttplib_response=conn.getresponse()File"/usr/lib/python3.6/http/client.py",line1331,ingetresponseresponse.begin()File"/usr/lib/python3.6/http/client.py",line297,inbeginversion,status,reason=self._read_status()File"/usr/lib/python3.6/http/client.py",line266,in_read_statusraiseRemoteDisconnected("Remote end closed connection without"http.client.RemoteDisconnected:Remoteend closed connection without responseDuringhandling of the above exception,another exception occurred:Traceback(most recent call last):File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/adapters.py",line440,insendtimeout=timeoutFile"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/urllib3/connectionpool.py",line639,inurlopen_stacktrace=sys.exc_info()[2])File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/urllib3/util/retry.py",line388,inincrementraiseMaxRetryError(_pool,url,errororResponseError(cause))urllib3.exceptions.MaxRetryError:HTTPSConnectionPool(host='www.thesite.com',port=443):Maxretries exceededwithurl:/asdzxcqwe/2058706(CausedbyProxyError('Cannot connect to proxy.',RemoteDisconnected('Remote end closed connection without response',)))Duringhandling of the above exception,another exception occurred:Traceback(most recent call last):File"/opt/scripts/this-is-my-app/fetcher.py",line417,inmake_requestresp=self.s.get(url,proxies=self.proxies)File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/sessions.py",line521,ingetreturnself.request('GET',url,**kwargs)File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/sessions.py",line508,inrequestresp=self.send(prep,**send_kwargs)File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/sessions.py",line640,insendhistory=[respforrespingen]ifallow_redirectselse[]File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/sessions.py",line640,inhistory=[respforrespingen]ifallow_redirectselse[]File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/sessions.py",line218,inresolve_redirects**adapter_kwargsFile"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/sessions.py",line618,insendr=adapter.send(request,**kwargs)File"/opt/scripts/this-is-my-app/.venv/lib/python3.6/site-packages/requests/adapters.py",line502,insendraiseProxyError(e,request=request)requests.exceptions.ProxyError:HTTPSConnectionPool(host='www.thesite.com',port=443):Maxretries exceededwithurl:/asdzxcqwe/2058706(CausedbyProxyError('Cannot connect to proxy.',RemoteDisconnected('Remote end closed connection without response',)))
python拦截http请求_如何使用Python 3抑制在request.get()请求期间记录的http.client异常...
最新推荐文章于 2023-06-20 06:34:19 发布