Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)> #463

Open
3 tasks done
705284036 opened this issue Oct 19, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@705284036
Copy link

First, confirm

  • I have read the instruction carefully
  • I have searched the existing issues
  • I have updated the extension to the latest version

What happened?

屏幕截图 2024-10-19 160716

Steps to reproduce the problem

屏幕截图 2024-10-19 160646

Sysinfo

win 11 谷歌浏览器 3060ti

Relevant console log

Traceback (most recent call last):
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\custom_nodes\comfyui-reactor-node\install.py", line 62, in <module>
    download(model_url, model_path, model_name)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\custom_nodes\comfyui-reactor-node\install.py", line 53, in download
    request = urllib.request.urlopen(url)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 557, in error
    result = self._call_chain(*args)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 519, in open
    response = self._open(req, data)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "E:\AI\comfyui\ComfyUI-aki-v1.4\ComfyUI-aki-v1.4\python\lib\urllib\request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)>

--------
[程序异常退出,退出代码为 1 (0x00000001)]

Additional information

No response

@705284036 705284036 added bug Something isn't working new labels Oct 19, 2024
@mx5nabcd
Copy link

I solved it by adding the following code to the "comfyui-reactor-node\install.py" file.

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

There could be a better way.

@rasen0
Copy link

rasen0 commented Nov 3, 2024

If it is a Windows system, you can try to configure the environment variable like this: set SSL_CERT_FILE=%APPDATA%\Python\Python39\site-packages\certifi\cacert.pem. The reason is that Python fails to locate the CA certificate.

@Gourieff Gourieff removed the new label Nov 3, 2024
@luongbaohoanggia19977
Copy link

If it is a Windows system, you can try to configure the environment variable like this: set SSL_CERT_FILE=%APPDATA%\Python\Python39\site-packages\certifi\cacert.pem. The reason is that Python fails to locate the CA certificate.

can you explain more, i'm in the same issue, thanksss !

@Sethchen001
Copy link

This problem has troubled me for too long. I checked all the required dependency version files and there were no problems, but the startup still reported this error

@Sethchen001
Copy link

如果是Windows系统,可以尝试这样配置环境变量:set SSL_CERT_FILE=%APPDATA%\Python\Python39\site-packages\certifi\cacert.pem。原因是Python无法找到CA证书。

The environment variables of this file have been set, but the same error is still displayed. Is there something wrong with the cacert.pem certificate file?

@NKZDDD
Copy link

NKZDDD commented Nov 14, 2024

Where to find certifi's certificate:

Run the following command at the command prompt:

python -c "import certifi; print(certifi.where())" prints your certificate path

Finally set in the environment variable

image

After setting, restart and normal download will begin

@Idmon
Copy link

Idmon commented Nov 15, 2024

I am running on MacOS Sequoia 15.1 and ran across the same problem.

What helped me was running this command:
open "/Applications/Python 3.x/Install Certificates.command"

Change the x to your python version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants