You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the expected property isSurveyMission is not present in the JSON response. I was able to work around it like so, but I don't know if it's the most responsible solution:
diff --git a/astroquery/esasky/core.py b/astroquery/esasky/core.py
index cc630509..cc72e7c3 100644
--- a/astroquery/esasky/core.py+++ b/astroquery/esasky/core.py@@ -709,8 +709,8 @@ class ESASkyClass(BaseQuery):
for entry in metadata])
from_query = " FROM {}".format(json[self.__TAP_TABLE_STRING])
- if (radiusDeg != 0 or json[self.__IS_SURVEY_MISSION_STRING]):- if (json[self.__IS_SURVEY_MISSION_STRING]):+ if (radiusDeg != 0 or json.get(self.__IS_SURVEY_MISSION_STRING, False)):+ if (json.get(self.__IS_SURVEY_MISSION_STRING, False)):
where_query = (" WHERE 1=CONTAINS(pos, CIRCLE('ICRS', {}, {}, {}));".
format(ra, dec, radiusDeg))
else:
After I apply this fix I get:
WARNING: W50: None:37:0: W50: Invalid unit string 'microns' [astropy.io.votable.tree]
WARNING: W50: None:43:0: W50: Invalid unit string 'seconds' [astropy.io.votable.tree]
Out[3]:
TableList with 1 tables:
'0:HERSCHEL' with 12 column(s) and 28 row(s)
which seems reasonable (the VOTable warnings are no surprise I suppose :)
Thanks for reporting this. We have changed the jsons slightly in the latest release of ESASky & forgot to properly change the astroquery module. I'll fix it today.
I had trouble updating to the latest versions of astroquery in my Mac through Conda. Apparently my Mac has several directories for python. Your solution was the easiest and worked. Thanks
The following example results in an exception,
KeyError: 'isSurveyMission'
:It seems the expected property
isSurveyMission
is not present in the JSON response. I was able to work around it like so, but I don't know if it's the most responsible solution:After I apply this fix I get:
which seems reasonable (the VOTable warnings are no surprise I suppose :)
Originally reported at astropy/astropy-tutorials#463
The text was updated successfully, but these errors were encountered: