urllib3.exceptions.ProtocolError: (‘Connection aborted.’, error(10054, ‘An existing connection was forcibly closed by the remote host’))

This error message… urllib3.exceptions.ProtocolError: (‘Connection aborted.’, error(10054, ‘An existing connection was forcibly closed by the remote host’)) …implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session. Your main issue is the incompatibility between the version of the binaries you are using as follows: You are using chromedriver=2.20 Release Notes … Read more

Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

You can disable any Python warnings via the PYTHONWARNINGS environment variable. In this case, you want: export PYTHONWARNINGS=”ignore:Unverified HTTPS request” To disable using Python code (requests >= 2.16.0): import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) For requests < 2.16.0, see original answer below. Original answer The reason doing urllib3.disable_warnings() didn’t work for you is because it looks like you’re … Read more

MaxRetryError: HTTPConnectionPool: Max retries exceeded (Caused by ProtocolError(‘Connection aborted.’, error(111, ‘Connection refused’)))

This error message… MaxRetryError: HTTPConnectionPool(host=”127.0.0.1″, port=51379): Max retries exceeded with url: /session/2e64d2a1-3c7f-4221-96fe-9d0b1c102195/window (Caused by ProtocolError(‘Connection aborted.’, error(111, ‘Connection refused’))) …implies that the call to self.driver.close() method failed raising MaxRetryError. A couple of things: First and foremost as per the discussion max-retries-exceeded exceptions are confusing the traceback is somewhat misleading. Requests wraps the exception for the … Read more

Python Requests throwing SSLError

The problem you are having is caused by an untrusted SSL certificate. Like @dirk mentioned in a previous comment, the quickest fix is setting verify=False: requests.get(‘https://example.com’, verify=False) Please note that this will cause the certificate not to be verified. This will expose your application to security risks, such as man-in-the-middle attacks. Of course, apply judgment. … Read more