Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaia.load_tables(only_names=True) no longer works #1910

Closed
Venustiano opened this issue Dec 1, 2020 · 10 comments
Closed

Gaia.load_tables(only_names=True) no longer works #1910

Venustiano opened this issue Dec 1, 2020 · 10 comments

Comments

@Venustiano
Copy link

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

@keflavich
Copy link
Contributor

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

@elliesch
Copy link

elliesch commented Dec 1, 2020

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

@keflavich
Copy link
Contributor

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

@AllenDowney
Copy link
Contributor

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.

@AllenDowney
Copy link
Contributor

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.

@AllenDowney
Copy link
Contributor

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

@keflavich
Copy link
Contributor

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

@Venustiano
Copy link
Author

Venustiano commented Dec 4, 2020 via email

@AllenDowney
Copy link
Contributor

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.

@keflavich
Copy link
Contributor

Let's open that as a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants