I am getting a SSL certificate error for the sample data with distribute with SlicerMorph. This is the URL:
https://github.com/SlicerMorph/SampleData/blob/master/mouse_skull_LMs.zip?raw=true
I can get to this file from a web browser using the same in Linux box, but I when I use the sample data module I get this error messages with a [SSL:: CERTIFICATE_VERIFY_FAILED] and it only happens with our Linux boxes. Windows doesn’t seem to be affected.
Download failed: Traceback (most recent call last):
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding'))
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked)
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked)
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg)
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 964, in send self.connect()
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname)
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session)
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 817, in __init__ self.do_handshake()
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake()
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 812, in download
File urllib.request.urlretrieve(uri, filePath, self.reportHook)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 248, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp:
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 544, in _open '_open', req)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError:
During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 609, in downloadFromSource filePath = self.downloadFileIntoCache(uri, fileName, checksum) F
ile "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 576, in downloadFileIntoCache return self.downloadFile(uri, destFolderPath, name, checksum)
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 816, in downloadFile raise ValueError(f"Failed to download {uri} to {filePath}") ValueError: Failed to download https://github.com/SlicerMorph/SampleData/blob/master/mouse_skull_LMs.zip?raw=true to /home/maga/SlicerTemp/RemoteIO/mouse_skull_LMs.zip
During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding'))
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked)
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked)
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 964, in send self.connect()
File "/home/maga/Slicer/lib/Python/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname)
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session)
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 817, in __init__ self.do_handshake()
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake()
File "/home/maga/Slicer/lib/Python/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)
During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 812, in downloadFile urllib.request.urlretrieve(uri, filePath, self.reportHook)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 248, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp:
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 544, in _open '_open', req)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname)
File "/home/maga/Slicer/lib/Python/lib/python3.6/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError:
During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 355, in b.connect('clicked()', lambda s=source: logic.downloadFromSource(s))
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 614, in downloadFromSource filePath = self.downloadFileIntoCache(uri, fileName, checksum)
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 576, in downloadFileIntoCache return self.downloadFile(uri, destFolderPath, name, checksum)
File "/home/maga/Slicer/bin/../lib/Slicer-4.11/qt-scripted-modules/SampleData.py", line 816, in downloadFile raise ValueError(f"Failed to download {uri} to {filePath}") ValueError: Failed to download https://github.com/SlicerMorph/SampleData/blob/master/mouse_skull_LMs.zip?raw=true to /home/maga/SlicerTemp/RemoteIO/mouse_skull_LMs.zip