diff --git a/api/src/opentrons/hardware_control/instruments/ot2/pipette_handler.py b/api/src/opentrons/hardware_control/instruments/ot2/pipette_handler.py index 193b3ae0737..3610add8042 100644 --- a/api/src/opentrons/hardware_control/instruments/ot2/pipette_handler.py +++ b/api/src/opentrons/hardware_control/instruments/ot2/pipette_handler.py @@ -896,7 +896,6 @@ def plan_check_drop_tip( # type: ignore[no-untyped-def] home_after, ): instrument = self.get_pipette(mount) - self.ready_for_tip_action(instrument, HardwareAction.DROPTIP, mount) bottom = instrument.plunger_positions.bottom droptip = instrument.plunger_positions.drop_tip diff --git a/api/src/opentrons/hardware_control/instruments/ot3/pipette_handler.py b/api/src/opentrons/hardware_control/instruments/ot3/pipette_handler.py index d5d7a607b2f..7bcf54f0fcc 100644 --- a/api/src/opentrons/hardware_control/instruments/ot3/pipette_handler.py +++ b/api/src/opentrons/hardware_control/instruments/ot3/pipette_handler.py @@ -880,7 +880,6 @@ def plan_check_drop_tip( home_after: bool, ) -> Tuple[DropTipSpec, Callable[[], None]]: instrument = self.get_pipette(mount) - self.ready_for_tip_action(instrument, HardwareAction.DROPTIP, mount) is_96_chan = instrument.channels == 96 diff --git a/api/tests/opentrons/protocol_api_old/core/simulator/test_instrument_context.py b/api/tests/opentrons/protocol_api_old/core/simulator/test_instrument_context.py index 4932edb855b..552cd5f5e9c 100644 --- a/api/tests/opentrons/protocol_api_old/core/simulator/test_instrument_context.py +++ b/api/tests/opentrons/protocol_api_old/core/simulator/test_instrument_context.py @@ -62,15 +62,6 @@ def test_dispense_no_tip(subject: InstrumentCore) -> None: ) -def test_drop_tip_no_tip(subject: InstrumentCore, tip_rack: LabwareCore) -> None: - """It should raise an error if a tip is not attached.""" - tip_core = tip_rack.get_well_core("A1") - - subject.home() - with pytest.raises(UnexpectedTipRemovalError, match="Cannot perform DROPTIP"): - subject.drop_tip(location=None, well_core=tip_core, home_after=False) - - def test_blow_out_no_tip(subject: InstrumentCore, labware: LabwareCore) -> None: """It should raise an error if a tip is not attached.""" with pytest.raises(UnexpectedTipRemovalError, match="Cannot perform BLOWOUT"): diff --git a/robot-server/tests/integration/http_api/runs/test_json_v6_run_failure.tavern.yaml b/robot-server/tests/integration/http_api/runs/test_json_v6_run_failure.tavern.yaml index 29377c8b9fe..b5796d80d23 100644 --- a/robot-server/tests/integration/http_api/runs/test_json_v6_run_failure.tavern.yaml +++ b/robot-server/tests/integration/http_api/runs/test_json_v6_run_failure.tavern.yaml @@ -41,7 +41,7 @@ stages: strict: - json:off - - name: Wait for the protocol to complete + - name: Wait for the run to fail max_retries: 10 delay_after: 0.1 request: @@ -54,16 +54,25 @@ stages: json: data: status: failed + + - name: Verify the run contains the expected error + request: + url: '{ot2_server_base_url}/runs/{run_id}' + method: GET + response: + status_code: 200 + strict: + - json:off + json: + data: errors: - id: !anystr createdAt: !anystr - errorType: 'UnexpectedTipRemovalError' - detail: 'Cannot perform DROPTIP without a tip attached.' - errorInfo: - mount: 'LEFT' - pipette_name: 'p10_single' errorCode: '3005' - wrappedErrors: [] + errorType: TipNotAttachedError + detail: Pipette should have a tip attached, but does not. + errorInfo: !anydict + wrappedErrors: !anylist - name: Verify commands contain the expected results request: url: '{ot2_server_base_url}/runs/{run_id}/commands' @@ -85,7 +94,7 @@ stages: startedAt: !anystr completedAt: !anystr status: succeeded - params: { } + params: {} - id: !anystr key: !anystr commandType: loadLabware @@ -114,32 +123,31 @@ stages: pipetteId: pipetteId - id: !anystr key: !anystr - commandType: dropTip + commandType: aspirate createdAt: !anystr startedAt: !anystr completedAt: !anystr status: failed error: id: !anystr + errorType: TipNotAttachedError createdAt: !anystr - errorType: 'UnexpectedTipRemovalError' - detail: 'Cannot perform DROPTIP without a tip attached.' - errorInfo: - mount: 'LEFT' - pipette_name: 'p10_single' + detail: Pipette should have a tip attached, but does not. errorCode: '3005' - wrappedErrors: [] + errorInfo: !anydict + wrappedErrors: !anylist params: pipetteId: pipetteId labwareId: tipRackId wellName: A1 wellLocation: - origin: default + origin: bottom offset: x: 0 y: 0 - z: 0 - alternateDropLocation: false + z: 1 + flowRate: 3.78 + volume: 100 - id: !anystr key: !anystr commandType: pickUpTip diff --git a/robot-server/tests/integration/http_api/runs/test_papi_v2_run_failure.tavern.yaml b/robot-server/tests/integration/http_api/runs/test_papi_v2_run_failure.tavern.yaml index 273274b1a54..14fbb483048 100644 --- a/robot-server/tests/integration/http_api/runs/test_papi_v2_run_failure.tavern.yaml +++ b/robot-server/tests/integration/http_api/runs/test_papi_v2_run_failure.tavern.yaml @@ -41,7 +41,7 @@ stages: strict: - json:off - - name: Wait for the protocol to complete + - name: Wait for the run to fail max_retries: 10 delay_after: 0.1 request: @@ -54,12 +54,24 @@ stages: json: data: status: failed + + - name: Verify the run contains the expected error + request: + url: '{ot2_server_base_url}/runs/{run_id}' + method: GET + response: + status_code: 200 + strict: + - json:off + json: + data: errors: - id: !anystr errorType: ExceptionInProtocolError createdAt: !anystr - detail: 'UnexpectedTipRemovalError [line 9]: Error 3005 UNEXPECTED_TIP_REMOVAL (UnexpectedTipRemovalError): Cannot perform DROPTIP without a tip attached.' + detail: 'UnexpectedTipRemovalError [line 9]: Error 3005 UNEXPECTED_TIP_REMOVAL (UnexpectedTipRemovalError): Cannot perform PREPARE_ASPIRATE without a tip attached.' errorCode: '4000' + errorInfo: !anydict wrappedErrors: !anylist - name: Verify commands contain the expected results @@ -82,7 +94,7 @@ stages: startedAt: !anystr completedAt: !anystr status: succeeded - params: { } + params: {} - id: !anystr key: !anystr commandType: loadLabware @@ -108,7 +120,7 @@ stages: mount: right - id: !anystr key: !anystr - commandType: dropTip + commandType: aspirate createdAt: !anystr startedAt: !anystr completedAt: !anystr @@ -117,7 +129,7 @@ stages: id: !anystr errorType: LegacyContextCommandError createdAt: !anystr - detail: 'Cannot perform DROPTIP without a tip attached.' + detail: 'Cannot perform PREPARE_ASPIRATE without a tip attached.' errorCode: '3005' errorInfo: !anydict wrappedErrors: !anylist @@ -126,9 +138,10 @@ stages: labwareId: !anystr wellName: A1 wellLocation: - origin: default + origin: top offset: x: 0 y: 0 z: 0 - alternateDropLocation: false + flowRate: 150 + volume: 100 diff --git a/robot-server/tests/integration/protocols/runtime_error.py b/robot-server/tests/integration/protocols/runtime_error.py index 34bb7a4fab4..f58d0df2d75 100644 --- a/robot-server/tests/integration/protocols/runtime_error.py +++ b/robot-server/tests/integration/protocols/runtime_error.py @@ -6,4 +6,4 @@ def run(ctx: ProtocolContext) -> None: tip_rack = ctx.load_labware("opentrons_96_tiprack_300ul", 1) pipette = ctx.load_instrument("p300_single", "right", [tip_rack]) - pipette.drop_tip(tip_rack.wells()[0]) + pipette.aspirate(location=tip_rack.wells()[0], volume=100) diff --git a/robot-server/tests/integration/protocols/simple_v6_failure.json b/robot-server/tests/integration/protocols/simple_v6_failure.json index 7358a47e62b..dd43f7b2d32 100644 --- a/robot-server/tests/integration/protocols/simple_v6_failure.json +++ b/robot-server/tests/integration/protocols/simple_v6_failure.json @@ -93,11 +93,19 @@ } }, { - "commandType": "dropTip", + "commandType": "aspirate", "params": { "pipetteId": "pipetteId", "labwareId": "tipRackId", - "wellName": "A1" + "wellName": "A1", + "volume": 100, + "wellLocation": { + "origin": "bottom", + "offset": { + "z": 1 + } + }, + "flowRate": 3.78 } }, {