From e14fbea67bbb9dd54c7d1b86999c6022667f52a6 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Sun, 7 Jun 2020 15:43:30 -0400 Subject: [PATCH] fixing issue #289 --- src/video2x_gui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video2x_gui.py b/src/video2x_gui.py index 672bd57..63d4c6a 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -257,7 +257,12 @@ class Video2XMainWindow(QMainWindow): # config file self.config_line_edit = self.findChild(QLineEdit, 'configLineEdit') self.enable_line_edit_file_drop(self.config_line_edit) - self.config_line_edit.setText(str((pathlib.Path(__file__).parent / 'video2x.yaml').absolute())) + + if getattr(sys, 'frozen', False): + self.config_line_edit.setText(str((pathlib.Path(sys.executable).parent / 'video2x.yaml').absolute())) + elif __file__: + self.config_line_edit.setText(str((pathlib.Path(__file__).parent / 'video2x.yaml').absolute())) + self.config_select_file_button = self.findChild(QPushButton, 'configSelectButton') self.config_select_file_button.clicked.connect(self.select_config_file)