SSL:python requests.get 期间出现 WRONG_VERSION_NUMBER

ura*_*ome 7 http-proxy pytest python-3.x python-requests vcr

我正在尝试访问这样的 pypi 网址:

PYPI_URL = https://pypi.org/pypi/Django/json

try:
    response = requests.get(PYPI_URL)

except requests.exceptions.RequestException as err:
    print("Unable to access Pypi. ", err)
Run Code Online (Sandbox Code Playgroud)

但是当我尝试为 pytest 生成录像带时,出现此错误。

E       AssertionError: assert 'Unable to access Pypi' not in "Unable to acce...l.c:1108)')))\n"
E         'Unable to access Pypi' is contained here:
E           Unable to access Pypi. Error Connecting:  HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/Django/json (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1108)')))
E         ? +++++++++++++++++++++
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?为什么只有当我尝试生成盒式磁带时它才会抱怨?如果我只运行 pytest 而不生成 VCR 磁带,测试就会通过。