diff --git a/QtPyLoT.py b/QtPyLoT.py index f32c19b7..b1e132f8 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -716,7 +716,7 @@ class MainWindow(QMainWindow): event = self.get_current_event() data = Data(self, event) try: - data_new = Data(self, evtdata=fname) + data_new = Data(self, evtdata=str(fname)) data += data_new except ValueError: qmb = QMessageBox(self, icon=QMessageBox.Question, diff --git a/pylot/core/io/data.py b/pylot/core/io/data.py index 21488ce5..343eb778 100644 --- a/pylot/core/io/data.py +++ b/pylot/core/io/data.py @@ -39,7 +39,7 @@ class Data(object): elif isinstance(evtdata, dict): evt = readPILOTEvent(**evtdata) evtdata = evt - elif isinstance(evtdata, basestring): + elif isinstance(evtdata, str): try: cat = read_events(evtdata) if len(cat) is not 1: