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

SDSS.query_crossid doesn't work for DR<10 #2303

Closed
bsipocz opened this issue Feb 23, 2022 · 2 comments · Fixed by #2318
Closed

SDSS.query_crossid doesn't work for DR<10 #2303

bsipocz opened this issue Feb 23, 2022 · 2 comments · Fixed by #2318

Comments

@bsipocz
Copy link
Member

bsipocz commented Feb 23, 2022

Run into this with the test suite, didn't investigate in detail. It likely just needs the URLs fixed. Could you maybe have a look @weaverba137?

In [1]: from astroquery import sdss

In [2]: from astropy.coordinates import SkyCoord
   ...: from astropy.table import Table

In [3]: coords = SkyCoord('0h8m05.63s +14d50m23.3s')

In [4]: sdss.SDSS.query_crossid(coords,data_release=9)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-4-6418e02a3b0b> in <module>
----> 1 sdss.SDSS.query_crossid(coords,data_release=9)

~/munka/devel/worktrees/astroquery/testings/astroquery/utils/class_or_instance.py in f(*args, **kwds)
     23         def f(*args, **kwds):
     24             if obj is not None:
---> 25                 return self.fn(obj, *args, **kwds)
     26             else:
     27                 return self.fn(cls, *args, **kwds)

~/munka/devel/worktrees/astroquery/testings/astroquery/utils/process_asyncs.py in newmethod(self, *args, **kwargs)
     27             if kwargs.get('get_query_payload') or kwargs.get('field_help'):
     28                 return response
---> 29             result = self._parse_result(response, verbose=verbose)
     30             self.table = result
     31             return result

~/munka/devel/worktrees/astroquery/testings/astroquery/sdss/core.py in _parse_result(self, response, verbose)
    871                                           names=True, dtype=None,
    872                                           delimiter=',', skip_header=skip_header,
--> 873                                           comments='#'))
    874 
    875         if len(arr) == 0:

~/.pyenv/versions/3.7.9/lib/python3.7/site-packages/numpy/lib/npyio.py in genfromtxt(fname, dtype, comments, delimiter, skip_header, skip_footer, converters, missing_values, filling_values, usecols, names, excludelist, deletechars, replace_space, autostrip, case_sensitive, defaultfmt, unpack, usemask, loose, invalid_raise, max_rows, encoding)
   2078             # Raise an exception ?
   2079             if invalid_raise:
-> 2080                 raise ValueError(errmsg)
   2081             # Issue a warning ?
   2082             else:

ValueError: Some errors were detected !
    Line #12 (got 3 columns instead of 1)
    Line #32 (got 5 columns instead of 1)
    Line #34 (got 3 columns instead of 1)

Response:

<!DOCTYPE html>
<html>
    <head>
        <title>The resource cannot be found.</title>
        <meta name="viewport" content="width=device-width" />
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }
         @media screen and (max-width: 639px) {
          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
         }
         @media screen and (max-width: 479px) {
          pre { width: 280px; }
         }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/dr9' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>The resource cannot be found.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
            <br><br>

            <b> Requested URL: </b>/dr9/en/tools/crossid/x_crossid.aspx<br><br>

            </font>

    </body>
</html>
@weaverba137
Copy link
Member

I won't get to this until next week, but I suspect this will be straightforward to fix.

@bsipocz
Copy link
Member Author

bsipocz commented Feb 24, 2022

Thanks. No rush, any time is fine, no one really complained about it and I just accidentally run into it.

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

Successfully merging a pull request may close this issue.

2 participants