Skip to content

premerge test error: 'ContentTooShortError' is not defined #3461

@wyli

Description

@wyli

Describe the bug

======================================================================
ERROR: test_shape_26 (tests.test_efficientnet.TestEFFICIENTNET)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/test_efficientnet.py", line 255, in test_shape
    net = EfficientNetBN(**input_param).to(device)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/monai/networks/nets/efficientnet.py", line 556, in __init__
    _load_state_dict(self, model_name, progress, adv_prop)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/monai/networks/nets/efficientnet.py", line 719, in _load_state_dict
    pretrain_state_dict = model_zoo.load_url(model_url, progress=progress)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 586, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 452, in download_url_to_file
    u = urlopen(req)
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 563, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 755, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Egress is over the account limit.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/parameterized/parameterized.py", line 533, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/test_efficientnet.py", line 256, in test_shape
    except (ContentTooShortError, HTTPError, RuntimeError) as e:
NameError: name 'ContentTooShortError' is not defined

======================================================================
ERROR: test_shape_28 (tests.test_efficientnet.TestEFFICIENTNET)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/test_efficientnet.py", line 255, in test_shape
    net = EfficientNetBN(**input_param).to(device)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/monai/networks/nets/efficientnet.py", line 556, in __init__
    _load_state_dict(self, model_name, progress, adv_prop)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/monai/networks/nets/efficientnet.py", line 719, in _load_state_dict
    pretrain_state_dict = model_zoo.load_url(model_url, progress=progress)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 586, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 452, in download_url_to_file
    u = urlopen(req)
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 563, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 755, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Egress is over the account limit.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/parameterized/parameterized.py", line 533, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/test_efficientnet.py", line 256, in test_shape
    except (ContentTooShortError, HTTPError, RuntimeError) as e:
NameError: name 'ContentTooShortError' is not defined

Metadata

Metadata

Assignees

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