From 227112cbac65b0a57c6440ddfc4cae8a6146fbc7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Jul 2017 13:30:54 +0200 Subject: [PATCH] [change] parameter evtdata of class Data has to be called as str object (instead of outdated basestring) to make the class python 3 compatible --- QtPyLoT.py | 2 +- pylot/core/io/data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: