From ccca4f4421879340293763e91b3be1910034bb49 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sun, 30 Oct 2022 21:08:23 +0100 Subject: [PATCH] added handling errors from (MathEntry) GetValue --- slic/gui/daqpanels/tools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/slic/gui/daqpanels/tools.py b/slic/gui/daqpanels/tools.py index 4cd231a1..f07632dc 100644 --- a/slic/gui/daqpanels/tools.py +++ b/slic/gui/daqpanels/tools.py @@ -138,7 +138,12 @@ class ETADisplay(PVDisplay): def update(self, _event): factor = 1 for tc in self.textctrls: - val = tc.GetValue() + try: + val = tc.GetValue() + except: + # if any of the values is missing, cannot calculate factor + factor = None + break try: val = int(val) except (ValueError, TypeError):