From 79b396a66f4edef6fb159033fa0dcae131e13e75 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 2 Apr 2025 17:54:12 +0100 Subject: [PATCH] CSM always returns to start on error --- .../things/camera_stage_mapping.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openflexure_microscope_server/things/camera_stage_mapping.py b/src/openflexure_microscope_server/things/camera_stage_mapping.py index 5efdfb59..337b08fb 100644 --- a/src/openflexure_microscope_server/things/camera_stage_mapping.py +++ b/src/openflexure_microscope_server/things/camera_stage_mapping.py @@ -33,7 +33,6 @@ from camera_stage_mapping.camera_stage_calibration_1d import ( image_to_stage_displacement_from_1d, ) from labthings_fastapi.dependencies.invocation import ( - InvocationCancelledError, InvocationLogger, ) from labthings_fastapi.types.numpy import NDArray, denumpify, DenumpifyingDict @@ -206,7 +205,7 @@ class CameraStageMapper(Thing): result: dict = calibrate_backlash_1d( tracker, move, direction_array, logger=logger ) - except InvocationCancelledError as e: + except Exception as e: logger.info("Returning to starting position") stage.move_absolute(**starting_position, block_cancellation=True) raise e