-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
ESO: decompressing .fits.Z files is broken #1818
Comments
Dear astroquery maintainers, I'd like to know if you have any advise on this issue, as we at ESO are getting several tickets of users with exactly the same problem. Is there any recommendation that I should give to our users? Many thanks in advance! |
@almicol any chance you could provide a minimum working example for us to play with? We can try to find a solution, but I don't have an easy way to reproduce this right now. |
Hi Adam, I cannot reproduce the problem myself; I'll ask some users if they can provide me, or you directly, an example. |
A user (Nicolas Buchschacher) provided this interesting feedback:
My suggestion would be to change the astroquery.eso module to use token (OIDC) authentication instead. An example of that could be found here: Most importantly: ESO will decommission the request handler during the course of 2022; the download routine used by astroquery.eso interfaces with the request handler, hence that will soon break entirely. The only thing not yet available within the new ESO programmatic layer is the ability to query the instrument-specific tables. I hope to have them available in TAP during the year. Once that is done, the entire astroquery.eso module could be re-written (and simplified!) using TAP ADQL queries, DataLink, OIDC, and downloading files directly using the access_url provided in the TAP responses. Would you consider? I'd be happy to help answering any question you might have on this. Many thanks! |
@almicol we would love to use the more modern interface, but we need some help. Is there any chance ESO could contribute the updated code? |
@almicol - I can reiterate what Adam said above. it's very unlikely that any of us on the maintainer team will have the bandwidth to reimplement the module. However contributions from ESO would be very much appreciated, and we could provide code review for PRs that are making the change. |
@keflavich @bsipocz Many thanks to both. Indeed, it would be best if we do that. We will probably schedule this activity for the second half of the year, surely before decommissioning the current system. I guess we will interact with you when the time comes. Thanks! |
Unitl we have a new astroquery.eso module in place, would you be able to fix the current issue for our users? I reproduced that by putting a sleep(10800) in the
followed by the obvious error message that ... "OSError: Not a gzipped file" The def _download_file clearly fails to catch this, as it is trying to match the following:
3 things: the Content-Type match is also too strictly defined as there could be a blank separator (currently not present, but that is not guaranteed in the future); btw if the url matches "sso/login" there is no need to check for the content type; the trials == 1 would work only the first time the 2h limit is reached, and not if the list of datasets is so long, or the files so heavy, or the network so bad, that the download time exceeds the 4 hours, or the 6 hours, etc. It would be very nice if you could have a look at this. Many thanks! |
@almicol I have a bit of a hard time reading that; could you edit it to put the code blocks into triple-backticks so I can see which parts are (user-entered) code and which are not? We could certainly soften some of the type checking - again, a PR would be helpful! |
@keflavich I hope is more readable now |
Addressed by #2681 |
Folowing #1613, and while looking at reading
.fits.Z
with astropy (astropy/astropy#10714) I was curious to see how astroquery managed those files.BadGzipFile: Not a gzipped file (b'\x1f\x9d') exception
.The text was updated successfully, but these errors were encountered: