inforkgodara / whatsapp-bulk-messages-without-saving-contacts

It is a python script that sends WhatsApp messages automatically from the WhatsApp web application without saved contact numbers.
https://www.youtube.com/@inforkgodara
MIT License
119 stars 52 forks source link

certificate verify failed: unable to get local issuer certificate #5

Closed dipenparmar closed 2 years ago

dipenparmar commented 2 years ago

Showing certificate related issue

`====== WebDriver manager ======
Current google-chrome version is 99.0.4844
Get LATEST chromedriver version for 99.0.4844 google-chrome
Traceback (most recent call last):
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\connection.py", line 411, in connect
    self.sock = ssl_wrap_socket(
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\util\ssl_.py", line 428, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\util\ssl_.py", line 472, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Program Files\Python38\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Program Files\Python38\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "C:\Program Files\Python38\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\urllib3\util\retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='chromedriver.storage.googleapis.com', port=443): Max retries exceeded with url: /LATEST_RELEASE_99.0.4844 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Dipen.Parmar\Downloads\whatsapp-bulk-messages-without-saving-contacts\script.py", line 16, in <module>
    driver = webdriver.Chrome(ChromeDriverManager().install())
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\webdriver_manager\chrome.py", line 32, in install
    driver_path = self._get_driver_path(self.driver)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\webdriver_manager\manager.py", line 19, in _get_driver_path
    binary_path = self.driver_cache.find_driver(driver)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\webdriver_manager\driver_cache.py", line 74, in find_driver
    driver_version = driver.get_version()
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\webdriver_manager\driver.py", line 39, in get_version
    self.get_latest_release_version()
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\webdriver_manager\driver.py", line 72, in get_latest_release_version
    resp = requests.get(
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\requests\api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Dipen.Parmar\AppData\Roaming\Python\Python38\site-packages\requests\adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='chromedriver.storage.googleapis.com', port=443): Max retries exceeded with url: /LATEST_RELEASE_99.0.4844 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')))`
dipenparmar commented 2 years ago

Resolved using "pip install --upgrade certifi" command.

Details are in this link https://exerror.com/certificate-verify-failed-unable-to-get-local-issuer-certificate/