Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alma.download_files can not download html version of qa report #2138

Closed
astro-jingtao opened this issue Aug 18, 2021 · 3 comments
Closed

Alma.download_files can not download html version of qa report #2138

astro-jingtao opened this issue Aug 18, 2021 · 3 comments

Comments

@astro-jingtao
Copy link

~/anaconda3/lib/python3.7/site-packages/astroquery-0.4.2.dev6656-py3.7.egg/astroquery/alma/co                                                                                                                        re.py in download_files(self, files, savedir, cache, continuation, skip_unauthorized)
    715                 check_filename.raise_for_status()
    716                 if 'text/html' in check_filename.headers['Content-Type']:
--> 717                     raise ValueError("Bad query.  This can happen if you "
    718                                      "attempt to download proprietary "
    719                                      "data when not logged in")

ValueError: Bad query.  This can happen if you attempt to download proprietary data when not                                                                                                                         logged in

Looks like the html version of qa report is mistaken for permission denied

@astro-jingtao astro-jingtao changed the title Alma..download_files can not download html version of qa report Alma.download_files can not download html version of qa report Aug 18, 2021
@bsipocz
Copy link
Member

bsipocz commented Aug 18, 2021

Please post a full example you are trying to run, it would help us reproduce the issue and debug.

@bsipocz bsipocz added the alma label Aug 18, 2021
@astro-jingtao
Copy link
Author

Please post a full example you are trying to run, it would help us reproduce the issue and debug.

Thanks for your reply, this code could reproduce this error

from astroquery.alma import Alma

myAlma = Alma()
link = [r'https://almascience.nao.ac.jp/dataPortal/member.uid___A001_X1284_X1353.qa2_report.html']
myAlma.download_files(link)

@keflavich
Copy link
Contributor

@andamian this looks like a real bug - we should allow HTML downloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants