-
-
Notifications
You must be signed in to change notification settings - Fork 415
astroquery sometimes works fine with query result but most of the time not #2139
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
Comments
Please post a full example you are trying to run, it would help us reproduce the issue and debug. |
Hi, I encountered a similar issue. I'm using python 3.7.6, astropy 4.1 and astroquery 0.4.3. If I run the following:
I got an error that says there are no results:
However, If I extend the radius from 30" to 40", everything starts to work fine:
The problem is that my target is well within my first search radius, but somehow not found. The true distance is less than 1":
If I perform the same query on the Simbad webpage with 30' I get the first two targets which are within 30". Maybe something is wrong the handling of astropy units? |
First, you've written I was able to reproduce this error once, but clearing the cache and re-running solved it. Original error:
>>> Simbad.query_region(SkyCoord(ra,dec,unit=(u.hourangle, u.deg), frame='icrs'), radius=30*u.arcsec, cache=False)
<Table length=2>
MAIN_ID RA DEC RA_PREC DEC_PREC COO_ERR_MAJA COO_ERR_MINA COO_ERR_ANGLE COO_QUAL COO_WAVELENGTH COO_BIBCODE SCRIPT_NUMBER_ID
"h:m:s" "d:m:s" mas mas deg
object str13 str13 int16 int16 float32 float32 int16 str1 str1 object int32
----------- ------------- ------------- ------- -------- ------------ ------------ ------------- -------- -------------- ------------------- ----------------
* 61 Cyg 21 06 53.95 +38 44 57.9 6 6 -- -- 0 D O 2001AJ....122.3466M 1
* 61 Cyg A 21 06 53.9396 +38 44 57.897 14 14 0.073 0.086 90 A O 2018yCat.1345....0G 1 Clearing the cache is... still something we need to document better.
|
@keflavich - I suppose we could rewrite the error message and raise a |
Perhaps? But I'm not entirely sure what has caused this error; it seems to be an intermittent upstream error. There is perhaps a real bug here: a failed query should not be cached, and this is a failed query, not just a "no data found" query. |
Oh, sure if it's an upstream error, we still need to parse it more gently, and surely don't cache it. At minimum more examples are needed to how to handle cache and these type of issues. Relevant issues: #1838 also, there are a few cache related PRs and issues that maybe relevant: e.g. would be nice to wrap up #1634 and company. |
OK, I was able to reproduce with a few tests. This is an example of a failed query:
and a successful one:
so it looks like if there is no |
(note that I was able to reproduce the error through the SIMBAD sim-script form - this isn't an astroquery issue, but we can handle it better) |
Sorry, I meant 30", but as I can see you've already found the source of problem. |
I think this has been resolved in #2187. Regarding the need for better documentation for the caching, it already has issues opened, so for that purpose, there is no need to keep this one open, too. |
Ran into a similar issue that relied on an older version of Astropy (v4.3) and this is what solved it, thanks. |
Sometimes I can receive query result but other times I use exact same query with above error. Could you please investigate the reason and provide a fix?
Thank you in advance.
The text was updated successfully, but these errors were encountered: