request_das crashes
Summary
request_das
tool crashes during an attempt to download a GDAS dataset with default parameters
Steps to reproduce
request_das --grib_download_path=download_dir
2023-01-25 11:37:22,344 ERROR [calibpipe.DataRequest] (tool.run): Caught unexpected exception: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/site-packages/ctapipe/core/tool.py", line 349, in run
self.start()
File "/Users/mdalchen/work/dpps/code/code-prototypes/calibpipe/calibpipe/tools/request_DAS_data.py", line 27, in start
self.comp.request_rda_data() # uncommented it if you indeed want to send a request for data
File "/Users/mdalchen/work/dpps/code/code-prototypes/calibpipe/calibpipe/atmosphere/molecular_atmosphere_calibrator.py", line 372, in request_rda_data
self._is_request_ready(request_id)
File "/Users/mdalchen/work/dpps/code/code-prototypes/calibpipe/calibpipe/atmosphere/molecular_atmosphere_calibrator.py", line 354, in _is_request_ready
res = rc.get_status(request_id)
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/site-packages/rdams_client.py", line 473, in get_status
return ret.json()
File "/opt/mambaforge/envs/cta-dev/lib/python3.9/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
What is the expected correct behavior?
The code should not crash even if there's something wrong with the NCAR DB or the rdams
client
Relevant logs and/or screenshots
Environment
- Version used:
- Operation System:
Does it looks like the request status returned is wrong? I still receive the emails after some time, that the requested dataset is ready for download, but usually it happens after the tool crashed.