astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

Error when uploading user tables using Gaia TAP+ in csv format; format must be Astropy table or VOTable

Open schen70 opened this issue 3 years ago • 2 comments

When uploading user tables using Gaia TAP+ (either Gaia.launch_job or Gaia.launch_job_async), if the uploaded file format is a csv file, it seems like it is not correctly parsed as a csv file, and the job instead tries to parse it as a VOTable, and fails as a result. It might be a good idea to add a field to explicitly provide the format, like in the Gaia.upload_table function.

Also, it would be good to clarify in the documentation what uploaded table formats are allowed. Such language is present in https://astroquery.readthedocs.io/en/latest/gaia/gaia.html#uploading-table-from-file, but not in https://astroquery.readthedocs.io/en/latest/gaia/gaia.html#synchronous-query-on-an-on-the-fly-uploaded-table.

schen70 avatar Sep 15 '22 07:09 schen70

Immediate workaround is to load the file into an astropy Table, and provide that as the argument for launch_job).

bsipocz avatar Sep 26 '23 17:09 bsipocz

We have checked that all the examples in

https://www.cosmos.esa.int/web/gaia-users/archive/programmatic-access#Sect_1_ss1.3

and

https://www.cosmos.esa.int/web/gaia-users/archive/programmatic-access#Sect_3_ss3.4

only make use of votables. This is due to the fact of the TAP recommendation (https://www.ivoa.net/documents/TAP/20190927/REC-TAP-1.1.html#tth_sEc2.7.6): "If table upload is supported, the service must accept tables in VOTable format.".

But I fully agree that the this information must be included in the documentation of the functions launch_job and launch_job_async

cosmoJFH avatar Mar 23 '24 19:03 cosmoJFH