Skip to content

Commit 43b1be4

Browse files
authored
fix(api): update PipetteNotReadyToAspirateError message to not just blowouts (#19087)
# Overview Currently, if you try to aspirate after the plunger has been pushed below the zero position, you get an error message like: ``` Pipette cannot aspirate in place because of a previous blow out. The first aspirate following a blow-out must be from a specific well so the plunger can be reset in a known safe position. ``` This is misleading because the `PipetteNotReadyToAspirateError` can be triggered by blowouts, pushouts, or dispenses with correction volumes. In fact, all the recent bugs we encountered with `PipetteNotReadyToAspirateError` have been due to actions that are **not** blowouts, so this message text is confusing to users. This PR changes the error message to explain that the `PipetteNotReadyToAspirateError` is happening because of a previous dispense or blowout. ## Test Plan and Hands on Testing Updated unit tests. Will rely on CI to see if there's anything else I need to update. ## Review requests @ecormany Want to help me with the wording? ## Risk assessment Low.
1 parent f1dde51 commit 43b1be4

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

api/src/opentrons/protocol_engine/commands/air_gap_in_place.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ async def execute(self, params: AirGapInPlaceParams) -> _ExecuteReturn:
8989
)
9090
if not ready_to_aspirate:
9191
raise PipetteNotReadyToAspirateError(
92-
"Pipette cannot air gap in place because of a previous blow out."
93-
" The first aspirate following a blow-out must be from a specific well"
94-
" so the plunger can be reset in a known safe position."
92+
"Pipette cannot air gap in place because a previous dispense or blowout"
93+
" pushed the plunger beyond the bottom position."
94+
" The subsequent aspirate must be from a specific well so the plunger"
95+
" can be reset in a known safe position."
9596
)
9697

9798
state_update = StateUpdate()

api/src/opentrons/protocol_engine/commands/aspirate_in_place.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ async def execute(self, params: AspirateInPlaceParams) -> _ExecuteReturn:
8787
)
8888
if not ready_to_aspirate:
8989
raise PipetteNotReadyToAspirateError(
90-
"Pipette cannot aspirate in place because of a previous blow out."
91-
" The first aspirate following a blow-out must be from a specific well"
92-
" so the plunger can be reset in a known safe position."
90+
"Pipette cannot aspirate in place because a previous dispense or blowout"
91+
" pushed the plunger beyond the bottom position."
92+
" The subsequent aspirate must be from a specific well so the plunger"
93+
" can be reset in a known safe position."
9394
)
9495

9596
current_position = await self._gantry_mover.get_position(params.pipetteId)

api/src/opentrons/protocol_engine/commands/aspirate_while_tracking.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ async def execute(self, params: AspirateWhileTrackingParams) -> _ExecuteReturn:
100100
)
101101
if not ready_to_aspirate:
102102
raise PipetteNotReadyToAspirateError(
103-
"Pipette cannot aspirate while tracking because of a previous blow out."
104-
" The first aspirate following a blow-out must be from a specific well"
105-
" so the plunger can be reset in a known safe position."
103+
"Pipette cannot aspirate while tracking because a previous dispense or"
104+
" blowout pushed the plunger beyond the bottom position."
105+
" The subsequent aspirate must be from a specific well so the plunger"
106+
" can be reset in a known safe position."
106107
)
107108
state_update = StateUpdate()
108109

api/src/opentrons/protocol_engine/commands/liquid_probe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ async def _execute_common( # noqa: C901
156156
# only way for this to happen is if someone tries to do a liquid probe with
157157
# a tip that's previously held liquid, which they should avoid anyway.
158158
raise PipetteNotReadyToAspirateError(
159-
"The pipette cannot probe liquid because of a previous blow out."
159+
"The pipette cannot probe liquid because a previous dispense or blowout"
160+
" pushed the plunger beyond the bottom position."
160161
" The plunger must be reset while the tip is somewhere away from liquid."
161162
)
162163
elif aspirated_volume != 0:

api/tests/opentrons/protocol_engine/commands/test_air_gap_in_place.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ async def test_handle_air_gap_in_place_request_not_ready_to_aspirate(
171171

172172
with pytest.raises(
173173
PipetteNotReadyToAspirateError,
174-
match="Pipette cannot air gap in place because of a previous blow out."
175-
" The first aspirate following a blow-out must be from a specific well"
176-
" so the plunger can be reset in a known safe position.",
174+
match="Pipette cannot air gap in place because a previous",
177175
):
178176
await subject.execute(params=data)
179177

api/tests/opentrons/protocol_engine/commands/test_aspirate_in_place.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ async def test_handle_aspirate_in_place_request_not_ready_to_aspirate(
199199
).then_return(False)
200200
with pytest.raises(
201201
PipetteNotReadyToAspirateError,
202-
match="Pipette cannot aspirate in place because of a previous blow out."
203-
" The first aspirate following a blow-out must be from a specific well"
204-
" so the plunger can be reset in a known safe position.",
202+
match="Pipette cannot aspirate in place because a previous",
205203
):
206204
await subject.execute(params=data)
207205

api/tests/opentrons/protocol_engine/commands/test_aspirate_while_tracking.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ async def test_handle_aspirate_while_tracking_request_not_ready_to_aspirate(
237237
)
238238
with pytest.raises(
239239
PipetteNotReadyToAspirateError,
240-
match="Pipette cannot aspirate while tracking because of a previous blow out."
241-
" The first aspirate following a blow-out must be from a specific well"
242-
" so the plunger can be reset in a known safe position.",
240+
match="Pipette cannot aspirate while tracking because a previous",
243241
):
244242
await subject.execute(params=data)
245243

0 commit comments

Comments
 (0)