diff --git a/astroquery/utils/tap/xmlparser/utils.py b/astroquery/utils/tap/xmlparser/utils.py index 9b53c20070..7233283981 100644 --- a/astroquery/utils/tap/xmlparser/utils.py +++ b/astroquery/utils/tap/xmlparser/utils.py @@ -17,6 +17,9 @@ import gzip import io import json +import warnings + +import numpy as np from astropy import units as u from astropy.table import Table as APTable @@ -38,7 +41,12 @@ def read_http_response(response, output_format, *, correct_units=True, use_names result = APTable.read(io.BytesIO(gzip.decompress(data.read())), format=astropy_format, use_names_over_ids=use_names_over_ids) else: - result = APTable.read(io.BytesIO(gzip.decompress(data.read())), format=astropy_format) + with warnings.catch_warnings(): + # Capturing the warning and converting the objid column to int64 is necessary for consistency as + # it was convereted to string on systems with defaul integer int32 due to an overflow. + result = APTable.read(io.BytesIO(gzip.decompress(data.read())), format=astropy_format) + if 'solution_id' in result.columns: + result['solution_id'] = result['solution_id'].astype(np.uint64) except OSError: # data is not a valid gzip file by BadGzipFile.