From dfe3f9b32af7cc4b8ad8baae53e5b61f98367bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Wed, 10 Oct 2018 11:40:11 +0200 Subject: [PATCH] [Bugfix]: There might be no network nor location information available, strange! --- pylot/core/util/widgets.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index ecb7f889..97a8a398 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -3416,6 +3416,7 @@ class TuneAutopicker(QWidget): return str(self.stationBox.currentText()).split('.')[1] def get_current_station_id(self): + print(self.stationBox, self.stationBox.currentText()) return str(self.stationBox.currentText()) @staticmethod @@ -3433,7 +3434,15 @@ class TuneAutopicker(QWidget): self.pdlg_widget = None return self.load_wf_data() - network, station, location, channel = self.get_current_station_id() + try: + network, station, location, channel = self.get_current_station_id() + except ValueError as e: + vmsg = '{0}'.format(e) + print(vmsg) + station = self.get_current_station() + location = None + network = None + wfdata = self.data.getWFData() metadata = self.parent().metadata event = self.get_current_event()