Skip to content

SDSS DR12 query returns wrong url: HTTP Error 404: Not Found #739

@banados

Description

@banados

This problem happens when I tried to get a spectrum with the DR12 Plate MJD FiberID parameters, it does not crash if I used the DR7 parameters.

This is easier to explain with an example:

from astroquery.sdss import SDSS
s = SDSS.get_spectra(plate=7167, mjd=56604, fiberID=182) 

returns HTTPError: HTTP Error 404: Not Found

This is because it is querying the wrong url:

s2 = SDSS.get_spectra_async(plate=7167, mjd=56604, fiberID=182)
[Downloaded object from URL http://data.sdss3.org/sas/dr12/boss/spectro/redux/b'v5_7_0'/spectra/7167/spec-7167-56604-0182.fits with ID 5558563336]

The problem is with the b'v5_7_0' part it should be just v5_7_0 without the ' '

And the correct URL that takes you to download the spectrum is

http://data.sdss3.org/sas/dr12/boss/spectro/redux/v5_7_0/spectra/7167/spec-7167-56604-0182.fits

I'm sure the problem is in this part, especifically in the {run2d} argument.

This should be easy to fix but I could not find the root of the problem in the code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions