astropy / astropy/astroquery

Jwst.Edb.GetTimeseries service request no longer works

Open
#1,906 3 comments 0 reactions 0 assignees View on GitHub
bug mast
Dominant language
Python
Stars
791
Forks
451
Avg merge
1d 3h
Merged PRs (30d)
4

Description

The service request to retrieve mnemonic information from the JWST engineering database no longer works. Using `astroquery 0.4` I get the following error:

```
from astroquery.mast import Mast
service = "Mast.JwstEdb.GetTimeseries.All"
params = {'mnemonic': 'SA_ZADUCMDX',
'start':'2019-05-31 23:59:58',
'end':'2019-06-01 23:59:59'}

out = Mast.service_request(service, params, fetch_name="Mast.JwstEdb", pagesize=1000)

---------------------------------------------------------------------------
RemoteServiceError Traceback (most recent call last)
in
----> 1 out = Mast.service_request(service, params, fetch_name="Mast.JwstEdb", pagesize=1000)

~/anaconda3/lib/python3.7/site-packages/astroquery/utils/class_or_instance.py in f(*args, **kwds)
23 def f(*args, **kwds):
24 if obj is not None:
---> 25 return self.fn(obj, *args, **kwds)
26 else:
27 return self.fn(cls, *args, **kwds)

~/anaconda3/lib/python3.7/site-packages/astroquery/utils/process_asyncs.py in newmethod(self, *args, **kwargs)
27 if kwargs.get('get_query_payload') or kwargs.get('field_help'):
28 return response
---> 29 result = self._parse_result(response, verbose=verbose)
30 self.table = result
31 return result

~/anaconda3/lib/python3.7/site-packages/astroquery/mast/core.py in _parse_result(self, responses, verbose)
605 # check for error message
606 if result['status'] == "ERROR":
--> 607 raise RemoteServiceError(result.get('msg', "There was an error with your request."))
608
609 result_table = _mashup_json_to_table(result, col_config)

RemoteServiceError: Object reference not set to an instance of an `object.`
```

After updating to `0.4.1` I get a different error:
```
out = Mast.service_request(service, params, fetch_name="Mast.JwstEdb", pagesize=1000)

---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in
----> 1 out = Mast.service_request(service, params, fetch_name="Mast.JwstEdb", pagesize=1000)

~/anaconda3/lib/python3.7/site-packages/astroquery/utils/class_or_instance.py in f(*args, **kwds)
23 def f(*args, **kwds):
24 if obj is not None:
---> 25 return self.fn(obj, *args, **kwds)
26 else:
27 return self.fn(cls, *args, **kwds)

~/anaconda3/lib/python3.7/site-packages/astroquery/utils/process_asyncs.py in newmethod(self, *args, **kwargs)
27 if kwargs.get('get_query_payload') or kwargs.get('field_help'):
28 return response
---> 29 result = self._parse_result(response, verbose=verbose)
30 self.table = result
31 return result

~/anaconda3/lib/python3.7/site-packages/astroquery/mast/observations.py in _parse_result(self, responses, verbose)
796 """
797
--> 798 return self._portal_api_connection._parse_result(responses, verbose)
799
800 @class_or_instance

~/anaconda3/lib/python3.7/site-packages/astroquery/mast/discovery_portal.py in _parse_result(self, responses, verbose)
289 # check for error message
290 if result['status'] == "ERROR":
--> 291 raise RemoteServiceError(result.get('msg', "There was an error with your request."))
292
293 result_table = _json_to_table(result, col_config)

NameError: name 'RemoteServiceError' is not defined
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the two Mast.service_request examples and inspect the parsing paths shown in astroquery/mast/core.py, observations.py, and discovery_portal.py. Check the JwstEdb service response and the missing RemoteServiceError handling; done means the reported request no longer fails with either shown error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.