The ALMA data downloader is broken because of an upstream change:
from astroquery.alma import Alma
alma = Alma()
uid = 'uid://A001/X12a3/Xe9'
data_info = alma.get_data_info(uid, expand_tarfiles=True)
alma.retrieve_data_from_uid([uid])
This fails on the second entry in the list because there is now a blank URL in the access_url column:
>>> data_info
<Table length=9>
ID access_url service_def error_message semantics description content_type content_length readable
byte
object object object object object object object int64 bool
-------------------- -------------------------------------------------------------------------------------------- ----------------------------------------------------------- ------------- -------------- --------------------------------------------------------- ----------------- -------------- --------
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/member.uid___A001_X12a3_Xe9.README.txt #documentation Download documentation for ./uid://A001/X12a3/Xe9|README. text/plain 3523 True
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/2017.1.01185.S_uid___A001_X12a3_Xe9_001_of_001.tar #this Download dataset of type: null, and class: N/A. application/x-tar 556278784 True
uid://A001/X12a3/Xe9 DataLink.2017.1.01185.S_uid___A001_X12a3_Xe9_001_of_001.tar #this text/xml -- --
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/2017.1.01185.S_uid___A001_X12a3_Xe9_auxiliary.tar #auxiliary Download dataset of type: null, and class: N/A. application/x-tar 135479296 True
uid://A001/X12a3/Xe9 DataLink.2017.1.01185.S_uid___A001_X12a3_Xe9_auxiliary.tar #auxiliary text/xml -- --
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/2017.1.01185.S_uid___A002_Xd28a9e_X71b8.asdm.sdm.tar #progenitor Download dataset of type: , and class: N/A. application/x-tar 2343569408 True
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/2017.1.01185.S_uid___A002_Xd28a9e_X7b4d.asdm.sdm.tar #progenitor Download dataset of type: , and class: N/A. application/x-tar 2343861248 True
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/2017.1.01185.S_uid___A002_Xd29c1f_X1f74.asdm.sdm.tar #progenitor Download dataset of type: , and class: N/A. application/x-tar 2616798208 True
uid://A001/X12a3/Xe9 https://almascience.nrao.edu/dataPortal/2017.1.01185.S_uid___A002_Xd29c1f_X5cf.asdm.sdm.tar #progenitor Download dataset of type: , and class: N/A. application/x-tar 2680167424 True
The error is:
Traceback (most recent call last):
File "<ipython-input-13-3e41ffe75afd>", line 1, in <module>
alma.retrieve_data_from_uid([uid])
File "/home/adam/repos/astroquery/astroquery/alma/core.py", line 807, in retrieve_data_from_uid
downloaded_files = self.download_files(file_urls)
File "/home/adam/repos/astroquery/astroquery/alma/core.py", line 681, in download_files
check_filename = self._request('HEAD', file_link, auth=auth)
File "/home/adam/repos/astroquery/astroquery/query.py", line 315, in _request
response = query.request(self._session,
File "/home/adam/repos/astroquery/astroquery/query.py", line 69, in request
return session.request(self.method, self.url, params=self.params,
File "/home/adam/anaconda3/lib/python3.8/site-packages/requests/sessions.py", line 528, in request
prep = self.prepare_request(req)
File "/home/adam/anaconda3/lib/python3.8/site-packages/requests/sessions.py", line 456, in prepare_request
p.prepare(
File "/home/adam/anaconda3/lib/python3.8/site-packages/requests/models.py", line 316, in prepare
self.prepare_url(url, params)
File "/home/adam/anaconda3/lib/python3.8/site-packages/requests/models.py", line 390, in prepare_url
raise MissingSchema(error)
MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?
@andamian I think this is a simple fix in astroquery, I'll propose the fix, but I hope you understand something about the upstream change.
The ALMA data downloader is broken because of an upstream change:
This fails on the second entry in the list because there is now a blank URL in the
access_urlcolumn:The error is:
@andamian I think this is a simple fix in astroquery, I'll propose the fix, but I hope you understand something about the upstream change.