opentrons icon indicating copy to clipboard operation
opentrons copied to clipboard

bug: If Labware Position Check is cancelled, the run fails upon tip pickup

Open SyntaxColoring opened this issue 3 years ago • 1 comments

Overview

Certain kinds of protocols will fail at runtime if Labware Position Check was cancelled midway through in a certain way.

Steps to reproduce

  1. Write a JSONv6 protocol that involves picking up a tip and moving to some labware. Here's one.
  2. Upload the protocol to a robot.
  3. Start Labware Position Check.
  4. Proceed through Labware Position Check. Pick up a tip, when prompted.
  5. After picking up a tip and before dropping the tip, cancel Labware Position Check.
  6. Start the run.

Current behavior

The robot will start going through the run, but when the protocol first tries to pick up a tip, the run will fail with this error (as seen via journalctl):

Execution of a2facc34-2ee6-4a2c-8af4-223d69a747b0 failed
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/opentrons/protocol_engine/execution/command_executor.py", line 84, in execute
    result = await command_impl.execute(command.params)  # type: ignore[arg-type]
  File "/usr/lib/python3.7/site-packages/opentrons/protocol_engine/commands/pick_up_tip.py", line 41, in execute
    well_location=params.wellLocation,
  File "/usr/lib/python3.7/site-packages/opentrons/protocol_engine/execution/pipetting.py", line 109, in pick_up_tip
    increment=None,
  File "/usr/lib/python3.7/site-packages/opentrons/hardware_control/thread_manager.py", line 78, in wrapper
    return await call_coroutine_threadsafe(loop, attr, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/opentrons/hardware_control/thread_manager.py", line 46, in call_coroutine_threadsafe
    return await wrapped
  File "/usr/lib/python3.7/site-packages/opentrons/hardware_control/api.py", line 980, in pick_up_tip
    mount, tip_length, presses, increment
  File "/usr/lib/python3.7/site-packages/opentrons/hardware_control/instruments/pipette_handler.py", line 657, in plan_check_pick_up_tip
    raise TipAttachedError("Cannot pick up tip with a tip attached")
opentrons.hardware_control.types.TipAttachedError: Cannot pick up tip with a tip attached

Expected behavior

The run should succeed through the tip pickup.

SyntaxColoring avatar Jul 12 '22 14:07 SyntaxColoring

Possibly, solving https://github.com/Opentrons/opentrons/issues/10644 would also solve this specific problem. It would leave the general hazard of LPC state leaking into protocol run state, though.

SyntaxColoring avatar Jul 12 '22 15:07 SyntaxColoring

I don't have a robot in front of me to test, but I'm 90% sure that this isn't a problem anymore.

SyntaxColoring avatar Jan 02 '24 19:01 SyntaxColoring