Skip to content

BUG: SDSS KeyNotFoundException for query_region #2644

Description

@fmannucci

Hi, I am having the same problem with:
astroquery 0.4.7.d
python 3.10.9
numpy 1.23.5.

Using (for example) the example in the doc, as any other call:

from astropy.coordinates import SkyCoord
from astroquery.sdss import SDSS

pos = SkyCoord('0h8m05.63s +14d50m23.3s', frame='icrs')
xid = SDSS.query_region(pos, spectro=True)


Traceback (most recent call last):

  File "/var/folders/m2/32fmbv0s3hg46rj5ccx2r5g40000gn/T/ipykernel_49747/284473386.py", line 2, in <module>
    xid = SDSS.query_region(pos, spectro=True)

  File "/Users/filippo/opt/anaconda3/envs/Py310/lib/python3.10/site-packages/astroquery/utils/class_or_instance.py", line 25, in f
    return self.fn(obj, *args, **kwds)

  File "/Users/filippo/opt/anaconda3/envs/Py310/lib/python3.10/site-packages/astroquery/utils/process_asyncs.py", line 29, in newmethod
    result = self._parse_result(response, verbose=verbose)

  File "/Users/filippo/opt/anaconda3/envs/Py310/lib/python3.10/site-packages/astroquery/sdss/core.py", line 905, in _parse_result
    arr = np.atleast_1d(np.genfromtxt(io.BytesIO(response.content),

  File "/Users/filippo/opt/anaconda3/envs/Py310/lib/python3.10/site-packages/numpy/lib/npyio.py", line 2291, in genfromtxt
    raise ValueError(errmsg)

ValueError: Some errors were detected !
    Line #3 (got 3 columns instead of 1)
    Line #5 (got 3 columns instead of 1)
    Line #6 (got 4 columns instead of 1)
    Line #8 (got 4 columns instead of 1)
    Line #12 (got 4 columns instead of 1)
    Line #15 (got 6 columns instead of 1)
    Line #17 (got 4 columns instead of 1)
    Line #21 (got 3 columns instead of 1)
    Line #31 (got 3 columns instead of 1)

It works fine on another machine running python 3.8 and astroquery 0.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions