From f93499da7da21e6961b13a0694196e0f42ef64cc Mon Sep 17 00:00:00 2001 From: Ludger Kueperkoch Date: Wed, 16 Sep 2020 16:16:53 +0200 Subject: [PATCH] For unknown reasons sometimes station and network information are not avaialble, avoid program failure. --- PyLoT.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PyLoT.py b/PyLoT.py index 8e2b4dd7..6f6ba278 100755 --- a/PyLoT.py +++ b/PyLoT.py @@ -2468,8 +2468,10 @@ class MainWindow(QMainWindow): def pickDialog(self, wfID, seed_id=None): if not seed_id: seed_id = self.getTraceID(wfID) - network, station, location = seed_id.split('.')[:3] - if not station or not network: + try: + network, station, location = seed_id.split('.')[:3] + except: + print("Warning! No network, station, and location info available!") return self.update_status('picking on station {0}'.format(station)) data = self.get_data().getOriginalWFData().copy()