5

Unexpectedly, the API "requests" on python code started giving this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL 
routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error

On searching a number of things, I found a few packages to download. But that is also raising error: enter image description here

So, the main thing that I noticed is the

Could not fetch URL https://pypi.python.org/simple/pip/: 403 Client Error: SNI is required

Please advise what it is and how to resolve this. Thanks in advance!

Harshita
  • 372
  • 4
  • 16
  • did you find a solution?> – ThunderHorn Aug 10 '21 at 08:07
  • Possibly related: https://github.com/pypa/pypi-support/issues/978, though the timeframes don't match up. PyPI has deprecated all non SNI access, which includes the default installation of pip in python2.6 – Eldritch Cheese Aug 14 '21 at 14:57
  • https://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl – Jos Aug 15 '21 at 07:01

0 Answers0