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

[bug]: URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (openpose) #6615

Closed
1 task done
aleyan opened this issue Jul 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@aleyan
Copy link

aleyan commented Jul 14, 2024

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

macOS

GPU vendor

Apple Silicon (MPS)

GPU model

Macbook air M2 16GB

GPU VRAM

No response

Version number

v4.2.4

Browser

126.0.6478.127

Python dependencies

{
"accelerate": "0.30.1",
"compel": "2.0.2",
"cuda": null,
"diffusers": "0.27.2",
"numpy": "1.26.4",
"opencv": "4.9.0.80",
"onnx": "1.15.0",
"pillow": "10.4.0",
"python": "3.11.9",
"torch": "2.2.2",
"torchvision": "0.17.2",
"transformers": "4.41.1",
"xformers": null
}

What happened

  1. Open "Generation" section in left nav
  2. Open "Control Layers" tab
  3. Click "+ Add Layer"
  4. Select "+ Global Control Adapter Layer"
  5. Select "control_v11p_sd15_openpose" model
  6. Drag image from "assests" into adapter layer upload slot
  7. Get red banner error below:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>

Additional Info

Running invoke backend locally on my mac and connecting to it via http://127.0.0.1/.

What you expected to happen

Expected no error

How to reproduce the problem

No response

Additional context

error in the invoke log:

[2024-07-14 13:42:31,190]::[InvokeAI]::ERROR --> Error while invoking session 2de53216-cf37-46e6-98f0-f6d81cb83aa6, invocation b51fd14d-c3b3-4432-8e42-41c0ca056633 (dw_openpose_image_processor): <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>
[2024-07-14 13:42:31,190]::[InvokeAI]::ERROR --> Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1303, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1349, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1298, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1058, in _send_output
    self.send(msg)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 996, in send
    self.connect()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1475, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1104, in _create
    self.do_handshake()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1382, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/app/services/session_processor/session_processor_default.py", line 129, in run_node
    output = invocation.invoke_internal(context=context, services=self._services)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/app/invocations/baseinvocation.py", line 289, in invoke_internal
    output = self.invoke(context)
             ^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/app/invocations/controlnet_image_processors.py", line 144, in invoke
    processed_image = self.run_processor(raw_image)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/app/invocations/controlnet_image_processors.py", line 628, in run_processor
    dw_openpose = DWOpenposeDetector()
                  ^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/backend/image_util/dw_openpose/__init__.py", line 43, in __init__
    self.pose_estimation = Wholebody()
                           ^^^^^^^^^^^
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/backend/image_util/dw_openpose/wholebody.py", line 36, in __init__
    download_with_progress_bar("yolox_l.onnx", DWPOSE_MODELS["yolox_l.onnx"]["url"], DET_MODEL_PATH)
  File "/Users/alex/invokeai/.venv/lib/python3.11/site-packages/invokeai/app/util/download_with_progress.py", line 49, in download_with_progress_bar
    request.urlretrieve(url, dest_path, ProgressBar(name))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
                            ^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 519, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/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:1006)>

Discord username

No response

@aleyan aleyan added the bug Something isn't working label Jul 14, 2024
@psychedelicious
Copy link
Collaborator

Hi, you may need to use the InstallCertificates.command utility. It's in /Applications/Python3.11/. See this SO answer: https://stackoverflow.com/a/58525755/13325455

Does that fix it?

@aleyan
Copy link
Author

aleyan commented Sep 17, 2024

🥳 This problem is now fixed in the latest release. I believe it was fixed with PR #6132 that removed download_with_progress_bar().

@aleyan aleyan closed this as completed Sep 17, 2024
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

2 participants