astropy-tutorials: Error in FITS-cubes.ipynb

When processing the FITS-cubes.ipynb notebook I’m getting an error from astroquery:

# Query for Herschel data in a 1 degree radius around the SMC
result = ESASky.query_region_maps('SMC', radius=1*u.deg, missions='Herschel')

print(result)
------------------

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-1-3cb6373bfea7> in <module>
      1 # Query for Herschel data in a 1 degree radius around the SMC
----> 2 result = ESASky.query_region_maps('SMC', radius=1*u.deg, missions='Herschel')
      3 
      4 print(result)

~/.virtualenvs/astropy/lib/python3.6/site-packages/astroquery/esasky/core.py in query_region_maps(self, position, radius, missions, get_query_payload, cache)
    236         self._store_query_result_maps(query_result, sanitized_missions,
    237                                       coordinates, sanitized_radius,
--> 238                                       get_query_payload, cache)
    239 
    240         if (get_query_payload):

~/.virtualenvs/astropy/lib/python3.6/site-packages/astroquery/esasky/core.py in _store_query_result_maps(self, query_result, missions, coordinates, radius, get_query_payload, cache)
    768             mission_table = self._query_region_maps(coordinates, radius,
    769                                                     mission, get_query_payload,
--> 770                                                     cache)
    771             if (len(mission_table) > 0):
    772                 query_result[mission.upper()] = mission_table

~/.virtualenvs/astropy/lib/python3.6/site-packages/astroquery/esasky/core.py in _query_region_maps(self, coordinates, radius, observation_name, get_query_payload, cache)
    682         query = (
    683             self._build_observation_query(coordinates, radius,
--> 684                                           self._find_observation_parameters(observation_tap_name)))
    685         request_payload = self._create_request_payload(query)
    686         if (get_query_payload):

~/.virtualenvs/astropy/lib/python3.6/site-packages/astroquery/esasky/core.py in _build_observation_query(self, coordinates, radius, json)
    711         from_query = " FROM {}".format(json[self.__TAP_TABLE_STRING])
    712         if (radiusDeg != 0 or json[self.__IS_SURVEY_MISSION_STRING]):
--> 713             if (json[self.__IS_SURVEY_MISSION_STRING]):
    714                 where_query = (" WHERE 1=CONTAINS(pos, CIRCLE('ICRS', {}, {}, {}));".
    715                                format(ra, dec, radiusDeg))

KeyError: 'isSurveyMission'
KeyError: 'isSurveyMission'

Not sure what that’s about or how best to fix it.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@pllim @embray Thank you so much, guys. The solution suggested by @pllim worked out for me. 😃

After installing astroquery from source and applying my workaround, the rest of the notebook executes successfully, so we can close this once astropy-tutorials is building with an appropriate version of astroquery.