Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2890

Document how to workaround [SSL: CERTIFICATE_VERIFY_FAILED] errors on Windows

    XMLWordPrintableJSON

Details

    • Task
    • Status: Backlog
    • Unknown
    • Resolution: Unresolved
    • None
    • 4.4
    • Docs
    • None

    Description

      Related to PYTHON-2798 and PYTHON-2808, we should document how to workaround AutoReconnect: SSL handshake failed: oauth2.googleapis.com:443: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852) type errors on Windows. One workaround is to install certifi and use tlsCAFile:

      client = MongoClient(tlsCAFile=certifi.where())
      

      Another workaround is to rely on Windows built in certification loader by manually connecting to the host before running the python app, like this:

      $ powershell.exe "Invoke-WebRequest -URI https://oauth2.googleapis.com/" > /dev/null || true
      $ python my_app.py ....
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shane.harvey@mongodb.com Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: