astroquery: Executing multiple alma.stage_data() commands sometimes fails with HTTPError: 500
When attempting to execute multiple alma.stage_data() commands, instances after the first call often fail with an HTTPError: 500 for an unknown (or not obvious to me) reason (see ipython session below).
In [1]: from astroquery.alma import Alma as alma
In [2]: alma.login('alipnick')
WARNING: No password was found in the keychain for the provided username. [astroquery.query]
alipnick, enter your password:
INFO: Authenticating alipnick on asa.alma.cl ... [astroquery.alma.core]
INFO: Authentication successful! [astroquery.alma.core]
In [3]: link_list = alma.stage_data('uid://A001/X131b/X57')
INFO: Staging files... [astroquery.alma.core]
.
In [4]: link_list = alma.stage_data('uid://A001/X131b/X57')
INFO: Staging files... [astroquery.alma.core]
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
<ipython-input-5-44c9337454d6> in <module>()
----> 1 link_list = alma.stage_data('uid://A001/X131b/X57')
/home/da_data/lava/lib/python2.7/site-packages/astroquery/alma/core.pyc in stage_data(self, uids)
331 staging_submission = self._request('GET', submission_url, cache=True)
332 self._staging_log['staging_submission'] = staging_submission
--> 333 staging_submission.raise_for_status()
334
335 data_page_url = staging_submission.url
/home/da_data/lava/lib/python2.7/site-packages/requests/models.pyc in raise_for_status(self)
937
938 if http_error_msg:
--> 939 raise HTTPError(http_error_msg, response=self)
940
941 def close(self):
HTTPError: 500 Server Error: 500 for url: https://almascience.nrao.edu/rh/error?errorMessage=java.lang.IllegalArgumentException%3A+Invalid+UUID+string%3A+alipnick
This seems to happen intermittently, as sometimes I have had this not cause a failure which brings up another issue with alma.stage_data() where changes to the alma.archive_url variable are ignored by alma.stage_data() (I’ll open a different ticket for that).
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (14 by maintainers)
Odd, this works for me. I also happen to update to 4.0 a few days ago, and ran my test. Was fine.
So, in my case the NRAO version worked, the ESO version is under maintenance.Just tried that out.
data = alma.query(payload={‘project_code’:pid},science=True,public=True) alma.cache_location = pwd alma.dataarchive_url = ‘https://almascience.nrao.edu.org’ alma.dataarchive_url = ‘https://almascience.eso.org’
I’d just like to add that I use astroquery every day and use the stage_data command with a list of non-public MOUSs from anywhere between 1 - 40 different projects and have never had an issue [with stage_data grabbing the correct data].
I just attempted it again with my currently open session (it’s been about 5 minutes) and it has still failed with HTTPError 500.