stable-diffusion-webui-depthmap-script: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate?
Discussed in https://github.com/thygate/stable-diffusion-webui-depthmap-script/discussions/174
<div type='discussions-op-text'>Originally posted by xjerixx April 12, 2023 Hello, I posted earlier about the Depth tab not showing up, after trying a lot of various ways of fixing it from stuff I’ve found online, it seems inputting homebrew commands to install ffmpeg worked, I can now see the depth tab.
However when I go to generate a depth map, I get this new error. Any thoughts on how this can be fixed? Thank you so much for your time and patience with me on this.
DepthMap v0.3.11
device: cpu
Loading model weights from ./models/leres/res101.pth
Downloading https://cloudstor.aarnet.edu.au/plus/s/lTIJF4vrvHCAI31/download to ./models/leres/res101.pth
Error completing request
Arguments: (0, <PIL.Image.Image image mode=RGB size=1335x748 at 0x17CAB8D30>, None, '', '', 1, 0, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, False, False, ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, True, False, False, False, 'u2net', False, 0, 2, False, None, True, False, True, False) {}
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1455, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create
self.do_handshake()
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ivan_timofejev/stable-diffusion-webui/modules/call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "/Users/ivan_timofejev/stable-diffusion-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "/Users/ivan_timofejev/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/depthmap.py", line 1110, in run_generate
outputs, mesh_fi, meshsimple_fi = run_depthmap(
File "/Users/ivan_timofejev/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/depthmap.py", line 322, in run_depthmap
download_file(model_path,"https://cloudstor.aarnet.edu.au/plus/s/lTIJF4vrvHCAI31/download")
File "/Users/ivan_timofejev/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/depthmap.py", line 1305, in download_file
torch.hub.download_url_to_file(url, filename)
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/hub.py", line 593, in download_url_to_file
u = urlopen(req)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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)>
Traceback (most recent call last):
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1078, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1012, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/components.py", line 4307, in postprocess
"name": self.make_temp_copy_if_needed(y),
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/processing_utils.py", line 362, in make_temp_copy_if_needed
temp_dir = self.hash_file(file_path)
File "/Users/ivan_timofejev/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/processing_utils.py", line 334, in hash_file
with open(file_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: "<div class='error'>URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)></div><div class='performance'><p class='time'>Time taken: <wbr>1.09s</p></div>"
</div>About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 39 (18 by maintainers)
Glad you got it working and can focus on the creative side. Have fun!
I’ll try and get that fixed asap, thank you for your help on getting this working on my machine, I’ve already started putting the mesh into blender and playing about with that 😃
Try one of the zoedepth models, and see where it tries to save them, perhaps we can download them manually too …
just messaging to confirm that it has worked
thank you so so much for getting back to me and being kind and patient. I really appreciate you developing this tool and helping make it work on my machine ❤️
It’s working or you would not have made it this far.
Well, it tries to download them again because it can’t find them there
downloading all those models at once (you do not need them all) is going to take some time …
Just get leres and the first 2 midas models to get started maybe …
You do need the others for the mentioned functionality, so to run 3d inpainting and boost like Mickmumpitz, you need those too.
When the models are in the correct path it will not try to download them and continue.
I encourage you to post in the above mentioned thread to fix your python environment’s missing certificates.
It’s an issue with your python environment where it cannot download models because it doesn’t recognize the server’s ssl certificate. You will likely encounter the same problem when using other functionality that has to download additional models.
For the midas and leres models you could download them manually and place them in your sd/models/midas folder.