Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): Addition of distribution error to prevent invalid disposal values #13659

6 changes: 6 additions & 0 deletions api/src/opentrons/protocols/advanced_control/transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,12 @@ def _plan_distribute(self):
.. Dispense air gap -> ...*

"""

if self._strategy.disposal_volume >= self._instr.max_volume:
raise ValueError(
"The Disposal Volume must be less than the Maximum Volume of the Instrument"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We can probably lowercase all these terms in the error text:

Suggested change
"The Disposal Volume must be less than the Maximum Volume of the Instrument"
"The disposal volume must be less than the maximum volume of the pipette"

)

# TODO: decide whether default disposal vol for distribute should be
# pipette min_vol or should we leave it to being 0 by default and
# recommend users to specify a disposal vol when using distribute.
Expand Down
Loading