Skip to content

Commit 4699251

Browse files
committed
Catch any errors when flushing position analysis
1 parent e40b37c commit 4699251

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/murfey/workflows/spa/flush_spa_preprocess.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,18 @@ def flush_spa_preprocessing(message: dict, db: Session, demo: bool = False):
325325
foil_hole_id = f.foil_hole_id
326326
else:
327327
# Register grid square and foil hole if not present
328-
foil_hole_id = _flush_position_analysis(
329-
movie_path=f.file_path,
330-
dcg_id=collected_ids[0].id,
331-
session_id=session_id,
332-
db=db,
333-
)
328+
try:
329+
foil_hole_id = _flush_position_analysis(
330+
movie_path=f.file_path,
331+
dcg_id=collected_ids[0].id,
332+
session_id=session_id,
333+
db=db,
334+
)
335+
except Exception as e:
336+
logger.error(
337+
f"Flushing position analysis for {f.file_path} caused exception {e}"
338+
)
339+
foil_hole_id = None
334340

335341
mrcp = Path(f.mrc_out)
336342
ppath = Path(f.file_path)

0 commit comments

Comments
 (0)