diff --git a/app/modules/sightings/models.py b/app/modules/sightings/models.py index c8833dd03..423f9a020 100644 --- a/app/modules/sightings/models.py +++ b/app/modules/sightings/models.py @@ -1649,7 +1649,10 @@ def _heatmap_src(cls, extern_ref, q_annot_content_uuid, d_annot_content_uuid): log.error( f'non-image on fetching {sage_src} to {filepath}; contents in {filepath}.err' ) - open(filepath + '.err', 'wb').write(resp.content) + try: + open(filepath + '.err', 'wb').write(resp.content) + except Exception as ex: + log.error(f'writing {filepath}.err got error {str(ex)}') return try: resp.raise_for_status()