From f42feaffa0636e7dc5d348033fcb0892b5de635d Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Thu, 26 Mar 2026 18:14:31 +0000 Subject: [PATCH 1/2] Align error parser status codes with MT-SICS spec: 'P' -> 'L' --- pylabrobot/scales/mettler_toledo_backend.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pylabrobot/scales/mettler_toledo_backend.py b/pylabrobot/scales/mettler_toledo_backend.py index 7c1b8923969..1b39b4b6b72 100644 --- a/pylabrobot/scales/mettler_toledo_backend.py +++ b/pylabrobot/scales/mettler_toledo_backend.py @@ -202,11 +202,11 @@ def _parse_basic_errors(self, response: List[str]) -> None: to a parity error or interface break - EL: logical error: The weigh module/balance can not execute the received command - These are in the second place of the response: - - I: Command not understood, not executable at present - - P: Command understood but not executable (incorrect parameter) - - O: Balance in overload range - - U: Balance in underload range + These are in the second place of the response (MT-SICS spec p.10, sec 2.1.3.1): + - I: Internal error (e.g. balance not ready yet) + - L: Logical error (e.g. parameter not allowed) + - +: Balance in overload range + - -: Balance in underload range """ if response[0] == "ES": @@ -218,7 +218,7 @@ def _parse_basic_errors(self, response: List[str]) -> None: if response[1] == "I": raise MettlerToledoError.executing_another_command() - if response[1] == "P": + if response[1] == "L": raise MettlerToledoError.incorrect_parameter() if response[1] == "+": raise MettlerToledoError.overload() From 5b9d6a33ff07adfba980adebc558ca74c5a49841 Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Thu, 26 Mar 2026 18:14:31 +0000 Subject: [PATCH 2/2] Align error parser status codes with MT-SICS spec: 'P' -> 'L' --- pylabrobot/scales/mettler_toledo_backend.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pylabrobot/scales/mettler_toledo_backend.py b/pylabrobot/scales/mettler_toledo_backend.py index 7c1b8923969..1b39b4b6b72 100644 --- a/pylabrobot/scales/mettler_toledo_backend.py +++ b/pylabrobot/scales/mettler_toledo_backend.py @@ -202,11 +202,11 @@ def _parse_basic_errors(self, response: List[str]) -> None: to a parity error or interface break - EL: logical error: The weigh module/balance can not execute the received command - These are in the second place of the response: - - I: Command not understood, not executable at present - - P: Command understood but not executable (incorrect parameter) - - O: Balance in overload range - - U: Balance in underload range + These are in the second place of the response (MT-SICS spec p.10, sec 2.1.3.1): + - I: Internal error (e.g. balance not ready yet) + - L: Logical error (e.g. parameter not allowed) + - +: Balance in overload range + - -: Balance in underload range """ if response[0] == "ES": @@ -218,7 +218,7 @@ def _parse_basic_errors(self, response: List[str]) -> None: if response[1] == "I": raise MettlerToledoError.executing_another_command() - if response[1] == "P": + if response[1] == "L": raise MettlerToledoError.incorrect_parameter() if response[1] == "+": raise MettlerToledoError.overload()