Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

urllib.error.URLError: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] #65

Open
DSmyungjin opened this issue Jan 9, 2023 · 1 comment

Comments

@DSmyungjin
Copy link

DSmyungjin commented Jan 9, 2023

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>

i was trying to install geopans on my desktop

Package `gdal` found in cache
Downloading package . . .
https://download.lfd.uci.edu/pythonlibs/archived/cp37/GDAL-3.4.2-cp37-cp37m-win_amd64.whl
GDAL-3.4.2-cp37-cp37m-win_amd64.whl
Traceback (most recent call last):
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 1350, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\http\client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\http\client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\http\client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\http\client.py", line 1036, in _send_output
    self.send(msg)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\http\client.py", line 976, in send
    self.connect()
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\http\client.py", line 1451, in connect
    server_hostname=server_hostname)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\ssl.py", line 423, in wrap_socket
    session=session
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\ssl.py", line 870, in _create
    self.do_handshake()
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\Scripts\pipwin.exe\__main__.py", line 7, in <module>
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\site-packages\pipwin\command.py", line 103, in main
    cache.install(package)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\site-packages\pipwin\pipwin.py", line 300, in install
    wheel_file = self.download(requirement)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\site-packages\pipwin\pipwin.py", line 294, in download
    return self._download(requirement, dest)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\site-packages\pipwin\pipwin.py", line 290, in _download
    obj.start()
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\site-packages\pySmartDL\pySmartDL.py", line 267, in start
    urlObj = urllib.request.urlopen(req, timeout=self.timeout, context=self.context)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 543, in _open
    '_open', req)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 503, in _call_chain
    result = func(*args)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 1393, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "C:\Users\audwl\anaconda3\envs\py37_crawler\lib\urllib\request.py", line 1352, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>

and tried to download wheel file by myself with this url
https://download.lfd.uci.edu/pythonlibs/archived/cp37/GDAL-3.4.2-cp37-cp37m-win_amd64.whl

it says server's security certification expired

@samapriya
Copy link
Contributor

Since you are using anaconda you can directly use conda install since they precompile packages as well.
for example

conda install gdal

LFD has the SSL certification expire on Jan 8 and the website itself has not been updated since June 2022.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants