Skip to content

"422 Client Error: Unprocessable Entity" when accessing Pan-STARRS DR2 via MAST astroquery  #2709

@fkiwy

Description

@fkiwy

Since last week, I get below error when accessing Pan-STARRS DR2 mean table via following astroquery from the MAST package:

from astroquery.mast import Catalogs

table = Catalogs.query_region(coords, radius=radius, catalog='Panstarrs', data_release='dr2', table='mean',
                              nStackDetections=[('gte', 2)], sort_by=[('asc', 'distance')])

    table = Catalogs.query_region(coords, radius=radius, catalog='Panstarrs', data_release='dr2', table='mean',
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\utils\class_or_instance.py", line 25, in f
    return self.fn(obj, *args, **kwds)
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\utils\process_asyncs.py", line 26, in newmethod
    response = getattr(self, async_method_name)(*args, **kwargs)
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\utils\class_or_instance.py", line 25, in f
    return self.fn(obj, *args, **kwds)
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\mast\collections.py", line 164, in query_region_async
    return self._current_connection.service_request_async(service, params, pagesize=pagesize, page=page)
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\utils\class_or_instance.py", line 25, in f
    return self.fn(obj, *args, **kwds)
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\mast\services.py", line 293, in service_request_async
    response = self._request('POST', request_url, data=catalogs_request, headers=headers, use_json=use_json)
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\astroquery\mast\services.py", line 194, in _request
    response.raise_for_status()
  File "C:\Users\Anaconda3\envs\test-env\lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
  requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://catalogs.mast.stsci.edu/api/v0.1/panstarrs/dr2/mean.json

EDIT: astroquery.mast.Catalogs.query_region seems to produce this error regardless of the specified catalog. All my publicly available tools using this API no longer work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions