Astroquery: Gaia.load_tables(only_names=True) no longer works

Created on 1 Dec 2020  Â·  10Comments  Â·  Source: astropy/astroquery

Running the following code

from astroquery.gaia import Gaia

g_tables = Gaia.load_tables(only_names=True)

produces the following errors

Created TAP+ (v20200428.1) - Connection:
    Host: gea.esac.esa.int
    Use HTTPS: True
    Port: 443
    SSL Port: 443
Created TAP+ (v20200428.1) - Connection:
    Host: gea.esac.esa.int
    Use HTTPS: True
    Port: 443
    SSL Port: 443
INFO: Retrieving tables... [astroquery.utils.tap.core]
INFO: Parsing tables... [astroquery.utils.tap.core]
Traceback (most recent call last):
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
xml.parsers.expat.ExpatError: mismatched tag: line 72, column 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/../svn/data2dot/scripts/GaiaLoadTables.py", line 3, in <module>
    g_tables = Gaia.load_tables(only_names=True)
  File "/home/../dev/astro/gd2d/lib/python3.6/site-packages/astroquery/utils/tap/core.py", line 799, in load_tables
    verbose=verbose)
  File "/home/../dev/astro/gd2d/lib/python3.6/site-packages/astroquery/utils/tap/core.py", line 236, in __load_tables
    tsp.parseData(response)
  File "/home/../dev/astro/gd2d/lib/python3.6/site-packages/astroquery/utils/tap/xmlparser/tableSaxParser.py", line 67, in parseData
    xml.sax.parse(data, self)
  File "/usr/lib/python3.6/xml/sax/__init__.py", line 33, in parse
    parser.parse(source)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.6/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 221, in feed
    self._err_handler.fatalError(exc)
  File "/usr/lib/python3.6/xml/sax/handler.py", line 38, in fatalError
    raise exception
xml.sax._exceptions.SAXParseException: <unknown>:72:2: mismatched tag
$ pip list
Package                       Version
----------------------------- ----------
alabaster                     0.7.12
argon2-cffi                   20.1.0
astropy                       4.0
astroquery                    0.4.2.dev0

bug gaia

All 10 comments

Confirmed, I can reproduce the issue locally. Unfortunately I have no clue. Need the Gaia team to help us here.

I am getting a similar issue using Gaia.launch_job_async

Here's my code:

from astroquery.gaia import Gaia

query = \
"""
SELECT
    *
FROM
    gaiadr2.gaia_source
WHERE
    source_id in {}
""".format(source_ids)

job = Gaia.launch_job_async(query, dump_to_file=False)

This throws the following HTTP connection error:

---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
<ipython-input-32-2da2eb853349> in <module>()
----> 1 job = Gaia.launch_job_async(query, dump_to_file=False)

~/anaconda3/lib/python3.6/site-packages/astroquery/utils/tap/core.py in launch_job_async(self, query, name, output_file, output_format, verbose, dump_to_file, background, upload_resource, upload_table_name, autorun)
    422                 self.__connHandler.dump_to_file(suitableOutputFile,
    423                                                 response)
--> 424             raise requests.exceptions.HTTPError(response.reason)
    425         else:
    426             location = self.__connHandler.find_header(

HTTPError: OK

This looks like an upstream error, maybe. Thanks for reporting!

Can confirm I have the same problem.

I sent an email to the Gaia Helpdesk to see if they are aware of a problem on their end. I will report back.

It looks like they are gearing up for the Early Data Release 3, so something might have broken in the excitement.

If the problem is at the Gaia server, it might be good to make a note of the response it's sending now: maybe astroquery could handle the error condition more gracefully.

Here's the response from Gaia Helpdesk:

The Gaia Archive is indeed down. You can find the announcements at the Gaia Archive website as well. It is down to prepare for our Gaia Early Data Release 3 tomorrow. Tomorrow, at 12:00 CET, the Gaia Archive will come back alive.

You can follow the countdown here: https://gea.esac.esa.int/archive/ and here: https://www.cosmos.esa.int/web/gaia/early-data-release-3

You may wish to have a look at the draft data model shared through this pages, as well as the Gaia EDR3 passbands and maybe install some provide Gaia EDR3 python code in the meanwhile. All to be found on these pages:
https://www.cosmos.esa.int/web/gaia/edr3-code

If you are interested, you can follow some livestreams on the release: https://www.cosmos.esa.int/web/gaia/edr3-events

Can anyone verify if this is back up, and if so, close this?

I can confirm that
Gaia.load_tables(only_names=True)
is working again.

Best,

On Fri, Dec 4, 2020 at 4:12 AM Adam Ginsburg notifications@github.com
wrote:

Can anyone verify if this is back up, and if so, close this?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/astropy/astroquery/issues/1910#issuecomment-738536144,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJLRF4DHKYCL2F45IFEIBATSTBHSHANCNFSM4UJUQ7TQ
.

Before closing this, can I suggest it would be a valuable enhancement if astroquery would generate an interpretable error message if the Gaia server is down? In my communication with the Gaia help desk, they expressed interest in helping with this.

Let's open that as a new issue.

Was this page helpful?
0 / 5 - 0 ratings