From 25157151935bb8180378ca4e9cf9fda57101c2b0 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Tue, 23 Jul 2024 13:42:45 +0200 Subject: [PATCH] bugfix: corrected for ValueError --- PyLoT.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PyLoT.py b/PyLoT.py index 5ba6ec0f..7981e7c9 100755 --- a/PyLoT.py +++ b/PyLoT.py @@ -1408,7 +1408,10 @@ class MainWindow(QMainWindow): eventBox.setView(tv) def get_max_path_length(self): - return max(len(event.path) for event in self.project.eventlist) + if self.project.eventlist: + return max(len(event.path) for event in self.project.eventlist) + else: + return None def collect_event_data(self, event, plmax): data = {