From a02d2926da63258ffa58c5bd0d0348da3e1c3911 Mon Sep 17 00:00:00 2001 From: tamarzanzouri Date: Thu, 17 Oct 2024 12:30:21 -0400 Subject: [PATCH] fixed bug with position unknow --- api/src/opentrons/protocol_engine/commands/aspirate_in_place.py | 2 +- api/src/opentrons/protocol_engine/commands/blow_out_in_place.py | 2 +- api/src/opentrons/protocol_engine/commands/dispense_in_place.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py b/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py index 4ae5ec10b97..59879e7ca63 100644 --- a/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py @@ -92,6 +92,7 @@ async def execute(self, params: AspirateInPlaceParams) -> _ExecuteReturn: " so the plunger can be reset in a known safe position." ) try: + current_position = await self._gantry_mover.get_position(params.pipetteId) volume = await self._pipetting.aspirate_in_place( pipette_id=params.pipetteId, volume=params.volume, @@ -99,7 +100,6 @@ async def execute(self, params: AspirateInPlaceParams) -> _ExecuteReturn: command_note_adder=self._command_note_adder, ) except PipetteOverpressureError as e: - current_position = await self._gantry_mover.get_position(params.pipetteId) return DefinedErrorData( public=OverpressureError( id=self._model_utils.generate_id(), diff --git a/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py b/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py index ca312c364bb..38165a4a626 100644 --- a/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py @@ -73,11 +73,11 @@ def __init__( async def execute(self, params: BlowOutInPlaceParams) -> _ExecuteReturn: """Blow-out without moving the pipette.""" try: + current_position = await self._gantry_mover.get_position(params.pipetteId) await self._pipetting.blow_out_in_place( pipette_id=params.pipetteId, flow_rate=params.flowRate ) except PipetteOverpressureError as e: - current_position = await self._gantry_mover.get_position(params.pipetteId) return DefinedErrorData( public=OverpressureError( id=self._model_utils.generate_id(), diff --git a/api/src/opentrons/protocol_engine/commands/dispense_in_place.py b/api/src/opentrons/protocol_engine/commands/dispense_in_place.py index 1cdbe90e908..36f15e8e528 100644 --- a/api/src/opentrons/protocol_engine/commands/dispense_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/dispense_in_place.py @@ -70,6 +70,7 @@ def __init__( async def execute(self, params: DispenseInPlaceParams) -> _ExecuteReturn: """Dispense without moving the pipette.""" try: + current_position = await self._gantry_mover.get_position(params.pipetteId) volume = await self._pipetting.dispense_in_place( pipette_id=params.pipetteId, volume=params.volume, @@ -77,7 +78,6 @@ async def execute(self, params: DispenseInPlaceParams) -> _ExecuteReturn: push_out=params.pushOut, ) except PipetteOverpressureError as e: - current_position = await self._gantry_mover.get_position(params.pipetteId) return DefinedErrorData( public=OverpressureError( id=self._model_utils.generate_id(),