Fix SSLCertVerificationError Python on MacOS

  1. Knowledge Base
  2. Programming
  3. Fix SSLCertVerificationError Python on MacOS

Fix Command:

open /Applications/Python\ 3.7/Install\ Certificates.command

Note: the version number 3.7 will be different if you are running a different version such as 3.8, etc.

​Error Message Was:

—————————————————————————

SSLCertVerificationError                  Traceback (most recent call last)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)

   1316                 h.request(req.get_method(), req.selector, req.data, headers,

-> 1317                           encode_chunked=req.has_header(‘Transfer-encoding’))

   1318             except OSError as err: # timeout error

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)

   1228         “””Send a complete request to the server.”””

-> 1229         self._send_request(method, url, body, headers, encode_chunked)

   1230

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)

   1274             body = _encode(body, ‘body’)

-> 1275         self.endheaders(body, encode_chunked=encode_chunked)

   1276

Leave a Reply

Your email address will not be published. Required fields are marked *