Skip to content Skip to sidebar Skip to footer

Get Request Resulting In Verifiedhttpsconnection Object Has No Attribute '_tunnel_host'

I am using the python requests library to make a HTTP GET requests to an API hosted on GAE. Requests version is requests==2.20.0 and installed via pip using a virtual environment.

Solution 1:

I had the same problem. In my case it was apparently related to Google App Engine's inability to work with requests in local development environment (with SDK). AppEngineAdapter requests_toolbelt is needed. Worked for me after.

Solution 2:

To fix up requests to work with Google App Engine but also allow my application to run outside of GAE, I added the following code:

try:
    from google.appengine.api import urlfetch
    from requests_toolbelt.adapters import appengine
    appengine.monkeypatch()
except ImportError:
    pass

Post a Comment for "Get Request Resulting In Verifiedhttpsconnection Object Has No Attribute '_tunnel_host'"