From e4b36a864611af53e7c2c62ca2cffbd5f05e05a5 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Wed, 23 Oct 2019 21:13:51 +0200 Subject: [PATCH] Make the import file explicitly mode='rt' --- nw/gui/winmain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nw/gui/winmain.py b/nw/gui/winmain.py index 866b5070..8a5d28ff 100644 --- a/nw/gui/winmain.py +++ b/nw/gui/winmain.py @@ -388,7 +388,7 @@ class GuiMain(QMainWindow): theText = None try: - with open(loadFile,mode="r") as inFile: + with open(loadFile,mode="rt") as inFile: theText = inFile.read() except Exception as e: self.makeAlert(["Could not read file. The file cannot be a binary file.",str(e)], nwAlert.ERROR)