Python请求http.client.RemoteDisconnected:远端关闭的连接,无响应:(

时间:2019-08-12 10:22:55

标签: python-3.x python-requests

Traceback (most recent call last):
  File "/Users/kozo4/Library/Python/3.6/lib/python/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/Users/kozo4/Library/Python/3.6/lib/python/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/Users/kozo4/Library/Python/3.6/lib/python/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    httplib_response = conn.getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kozo4/Library/Python/3.6/lib/python/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/Users/kozo4/Library/Python/3.6/lib/python/site-packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/Users/kozo4/Library/Python/3.6/lib/python/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=9090): Max retries exceeded with url: http://js2.a.yximgs.com/ufile/atlas/NzgwOTQwMTJfMTQzNzA4ODk0OTY=_1.webp (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))

During handling of the above exception, another exception occurred:

我不知道这是什么:( 这是python搜寻器。我获取了json数据,然后将其缓存在本地,但是为什么在我请求它(通常是.webp或.mp4文件)时报告此错误?

0 个答案:

没有答案