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

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

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Docs
    • Labels:
      None

      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 ....
      

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

              Created:
              Updated: