diff --git a/geospaas_wind/managers.py b/geospaas_wind/managers.py index a0a5b9c..91d1dec 100644 --- a/geospaas_wind/managers.py +++ b/geospaas_wind/managers.py @@ -34,12 +34,11 @@ def process(self, uri, force=False, *args, **kwargs): try: w = wind_from_sar_and_arome_forecast(uri) except (TooHighResolutionError, PolarizationError, ObjectDoesNotExist) as e: - try: + if type(e)==Dataset.DoesNotExist: + warnings.warn(uri+': '+e.args[0]) + else: + # ObjectDoesNotExist could happen if there is no overlap between SAR and model warnings.warn(e.file + ': ' + e.msg) - except AttributeError: - import ipdb - ipdb.set_trace() - warnings.warn(e) return None, False metadata = w.get_metadata()