You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g. if a url cannot be found, the following error appears from the test suite.
Traceback (most recent call last):
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/site-packages/nose/suite.py", line 210, in run
self.setUp()
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/site-packages/nose/suite.py", line 293, in setUp
self.setupContext(ancestor)
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/site-packages/nose/suite.py", line 316, in setupContext
try_run(context, names)
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/site-packages/nose/util.py", line 471, in try_run
return func()
File "/home/runner/work/stdpopsim/stdpopsim/tests/test_genetic_maps.py", line 37, in setUpModule
utils.download(genetic_map.url, local_file)
File "/home/runner/work/stdpopsim/stdpopsim/stdpopsim/utils.py", line 70, in download
with urllib.request.urlopen(url, timeout=30) as f_in:
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/share/miniconda/envs/stdpopsim/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
Probably we should catch the exception in utils.download(), print the url, then reraise the exception. Or maybe there's a way to add information to an exception before reraising?
The text was updated successfully, but these errors were encountered:
grahamgower
added a commit
to grahamgower/stdpopsim
that referenced
this issue
Jun 1, 2022
E.g. if a url cannot be found, the following error appears from the test suite.
Probably we should catch the exception in
utils.download()
, print the url, then reraise the exception. Or maybe there's a way to add information to an exception before reraising?The text was updated successfully, but these errors were encountered: