astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
695 stars 396 forks source link

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

Open schen70 opened 1 year ago

schen70 commented 1 year ago

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.

bsipocz commented 11 months ago

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

cosmoJFH commented 5 months ago

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