Python requests SSL23_GET_SERVER_HELLO or SSL3_GET_RECORD error
<p>I'm running a Python 2.7.3 application with OpenSSL 1.0.1:</p>

<pre><code>Python 2.7.3 (default, Jun 22 2015, 19:33:41) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import ssl
&gt;&gt;&gt; ssl.OPENSSL_VERSION
'OpenSSL 1.0.1 14 Mar 2012'
</code></pre>

<p>Initially, I did this:</p>

<pre><code>import requests
_session = requests.Session()
_session.get('https://bucketname.s3.amazonaws.com/file.name')
</code></pre>

<p>This resulted in the following error:</p>

<pre><code>  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 497, in send
    raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
</code></pre>

<p>After much Googling and stumbling on <a href="https://github.com/kennethreitz/requests/issues/606" rel="nofollow">https://github.com/kennethreitz/requests/issues/606</a> and its link to <a href="http://toolbelt.readthedocs.io/en/latest/user.html#ssladapter" rel="nofollow">http://toolbelt.readthedocs.io/en/latest/user.html#ssladapter</a>, I tried this:</p>

<pre><code>import requests
import requests_toolbelt
_session = requests.Session()
_session.mount('https://', requests_toolbelt.SSLAdapter(ssl.PROTOCOL_TLSv1))
_session.get('https://bucketname.s3.amazonaws.com/file.name')
</code></pre>

<p>But this resulting in a different error:</p>

<pre><code>  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 497, in send
    raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:504: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
</code></pre>

<p>No matter what I do, I cannot get Python Requests to access this URL. I just don't get it. It should be simple. It should just work, but it won't.</p>

<p>Any ideas?</p>