Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Some bug fixes #968

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/modules/sightings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,7 @@ def _parse_id_response(self, job_id_str, data):
sage_uuid = from_sage_uuid(target_annot_data['duuid'])
target_annot = Annotation.query.filter_by(content_guid=sage_uuid).first()
if not target_annot:
continue # this seems better than raising the exception (that kills fetching results)
raise HoustonException(
log,
f'Sage ID response with unknown target annot uuid {sage_uuid} for job {job_id_str}',
Expand All @@ -1493,6 +1494,7 @@ def _parse_id_response(self, job_id_str, data):
sage_uuid = from_sage_uuid(target_annot_data['duuid'])
target_annot = Annotation.query.filter_by(content_guid=sage_uuid).first()
if not target_annot:
continue # this seems better than raising the exception (that kills fetching results)
raise HoustonException(
log,
f'Sage ID response with unknown target annot uuid {sage_uuid} for job {job_id_str}',
Expand Down Expand Up @@ -1647,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()
Expand Down
Loading