diff --git a/astroquery/jplhorizons/core.py b/astroquery/jplhorizons/core.py index 86e378c9f9..272e7f97fa 100644 --- a/astroquery/jplhorizons/core.py +++ b/astroquery/jplhorizons/core.py @@ -20,7 +20,6 @@ from ..query import BaseQuery # async_to_sync generates the relevant query tools from _async methods from ..utils import async_to_sync -from ..exceptions import TableParseError # import configurable items declared in __init__.py from . import conf @@ -1301,10 +1300,7 @@ def _parse_result(self, response, verbose=None): # this is allowed: if `cache` was set to False, this # won't be needed pass - raise TableParseError("Failed to parse JPL Horizons result. " - "The raw response can be found in " - "`self.last_response`. Exception: " - + str(ex)) from ex + raise return data diff --git a/astroquery/jplhorizons/tests/test_jplhorizons.py b/astroquery/jplhorizons/tests/test_jplhorizons.py index 2474afe3f2..98cd7c9ae8 100644 --- a/astroquery/jplhorizons/tests/test_jplhorizons.py +++ b/astroquery/jplhorizons/tests/test_jplhorizons.py @@ -1,5 +1,6 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +from multiprocessing import Value import pytest import os from collections import OrderedDict @@ -62,7 +63,7 @@ def test_parse_result(patch_request): q = jplhorizons.Horizons(id='tlist_error') # need _last_query to be defined q._last_query = AstroQuery('GET', 'http://dummy') - with pytest.raises(TableParseError): + with pytest.raises(ValueError): res = q.ephemerides()