diff --git a/earthaccess/search.py b/earthaccess/search.py index d4bf94b6..f9368273 100644 --- a/earthaccess/search.py +++ b/earthaccess/search.py @@ -468,8 +468,8 @@ def get(self, limit: int = 2000) -> List[DataGranule]: RuntimeError: The CMR query failed. """ response = get_results(self.session, self, limit) - - cloud = self._is_cloud_hosted(response[0]) + if response: + cloud = self._is_cloud_hosted(response[0]) return [DataGranule(granule, cloud_hosted=cloud) for granule in response]