Reputation: 3766
The following example GET:
r = requests.get(url, auth=(self.key, ''), verify=False)
Fails with the following traceback:
File "/Library/Python/2.7/site-packages/requests/api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "/Library/Python/2.7/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/requests/adapters.py", line 497, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)
Running python 2.7.12
I can confirm this IS NOT a duplicate of Python requests gives SSL unknown protocol
Upvotes: 6
Views: 12231
Reputation: 3766
The solution to this problem turned out to be related to the requests library.
Adding the following to my python library resolved the issue:
pip install requests[security]
(Note this is not an ideal fix for TLS future security)
Upvotes: 3