Skip to content

TestPretrainedSENET URLError #4626

@wyli

Description

@wyli

Describe the bug

[2022-07-02T00:45:09.437Z] ======================================================================
[2022-07-02T00:45:09.437Z] ERROR: test_senet_shape_0 (tests.test_senet.TestPretrainedSENET)
[2022-07-02T00:45:09.437Z] ----------------------------------------------------------------------
[2022-07-02T00:45:09.437Z] Traceback (most recent call last):
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 1324, in do_open
[2022-07-02T00:45:09.437Z]     h.request(req.get_method(), req.selector, req.data, headers,
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/http/client.py", line 1234, in request
[2022-07-02T00:45:09.437Z]     self._send_request(method, url, body, headers, encode_chunked)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/http/client.py", line 1280, in _send_request
[2022-07-02T00:45:09.437Z]     self.endheaders(body, encode_chunked=encode_chunked)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/http/client.py", line 1229, in endheaders
[2022-07-02T00:45:09.437Z]     self._send_output(message_body, encode_chunked=encode_chunked)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/http/client.py", line 1008, in _send_output
[2022-07-02T00:45:09.437Z]     self.send(msg)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/http/client.py", line 948, in send
[2022-07-02T00:45:09.437Z]     self.connect()
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/http/client.py", line 1403, in connect
[2022-07-02T00:45:09.437Z]     self.sock = self._context.wrap_socket(self.sock,
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
[2022-07-02T00:45:09.437Z]     return self.sslsocket_class._create(
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/ssl.py", line 1040, in _create
[2022-07-02T00:45:09.437Z]     self.do_handshake()
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
[2022-07-02T00:45:09.437Z]     self._sslobj.do_handshake()
[2022-07-02T00:45:09.437Z] ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)
[2022-07-02T00:45:09.437Z] 
[2022-07-02T00:45:09.437Z] During handling of the above exception, another exception occurred:
[2022-07-02T00:45:09.437Z] 
[2022-07-02T00:45:09.437Z] Traceback (most recent call last):
[2022-07-02T00:45:09.437Z]   File "/usr/local/lib/python3.8/dist-packages/parameterized/parameterized.py", line 533, in standalone_func
[2022-07-02T00:45:09.437Z]     return func(*(a + p.args), **p.kwargs)
[2022-07-02T00:45:09.437Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_senet.py", line 105, in test_senet_shape
[2022-07-02T00:45:09.437Z]     net = test_pretrained_networks(model, input_param, device)
[2022-07-02T00:45:09.437Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/utils.py", line 131, in test_pretrained_networks
[2022-07-02T00:45:09.437Z]     return network(**input_param).to(device)
[2022-07-02T00:45:09.437Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/networks/nets/senet.py", line 371, in __init__
[2022-07-02T00:45:09.437Z]     _load_state_dict(self, "se_resnet50", progress)
[2022-07-02T00:45:09.437Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/networks/nets/senet.py", line 295, in _load_state_dict
[2022-07-02T00:45:09.437Z]     state_dict = load_state_dict_from_url(model_url, progress=progress)
[2022-07-02T00:45:09.437Z]   File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 586, in load_state_dict_from_url
[2022-07-02T00:45:09.437Z]     download_url_to_file(url, cached_file, hash_prefix, progress=progress)
[2022-07-02T00:45:09.437Z]   File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 452, in download_url_to_file
[2022-07-02T00:45:09.437Z]     u = urlopen(req)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
[2022-07-02T00:45:09.437Z]     return opener.open(url, data, timeout)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 531, in open
[2022-07-02T00:45:09.437Z]     response = meth(req, response)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
[2022-07-02T00:45:09.437Z]     response = self.parent.error(
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 563, in error
[2022-07-02T00:45:09.437Z]     result = self._call_chain(*args)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
[2022-07-02T00:45:09.437Z]     result = func(*args)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 755, in http_error_302
[2022-07-02T00:45:09.437Z]     return self.parent.open(new, timeout=req.timeout)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 525, in open
[2022-07-02T00:45:09.437Z]     response = self._open(req, data)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
[2022-07-02T00:45:09.437Z]     result = self._call_chain(self.handle_open, protocol, protocol +
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
[2022-07-02T00:45:09.437Z]     result = func(*args)
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 1367, in https_open
[2022-07-02T00:45:09.437Z]     return self.do_open(http.client.HTTPSConnection, req,
[2022-07-02T00:45:09.437Z]   File "/usr/lib/python3.8/urllib/request.py", line 1327, in do_open
[2022-07-02T00:45:09.437Z]     raise URLError(err)
[2022-07-02T00:45:09.437Z] urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)>
[2022-07-02T00:45:09.437Z] 
[2022-07-02T00:45:09.437Z] ----------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions