Skip to content

Commit 8754660

Browse files
committed
Fixing compatibility of nasa_exoplanet_archive with astropy <4.1
1 parent f32a0d5 commit 8754660

File tree

1 file changed

+4
-1
lines changed
  • astroquery/ipac/nexsci/nasa_exoplanet_archive

1 file changed

+4
-1
lines changed

astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ def get_tap_tables():
104104
"""Tables accessed by API are gradually migrating to TAP service. Generate current list of tables in TAP."""
105105
tap = pyvo.dal.tap.TAPService(baseurl=conf.url_tap)
106106
response = tap.search(query="select * from TAP_SCHEMA.tables", language="ADQL")
107-
tables = [table for table in response["table_name"].data if "TAP_SCHEMA." not in table]
107+
if not commons.ASTROPY_LT_4_1:
108+
tables = [table for table in response["table_name"].data if "TAP_SCHEMA." not in table]
109+
else:
110+
tables = [table.decode() for table in response["table_name"].data if b"TAP_SCHEMA." not in table]
108111
return tables
109112

110113

0 commit comments

Comments
 (0)