From c514aa5a1014c1fe3355ace7b88a5a6fe072bc84 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Thu, 1 Jun 2023 21:58:14 -0600 Subject: fix onefile --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index c07ed58..96f86c0 100644 --- a/main.py +++ b/main.py @@ -10,6 +10,8 @@ import sv_ttk import darkdetect import os +import sys + from os import path from docx import Document @@ -604,6 +606,11 @@ if __name__ == "__main__": traces_sample_rate=1.0 ) root = tk.Tk() + wd = os.getcwd() + try: + os.chdir(sys._MEIPASS) + except AttributeError: + os.chdir(wd) print(os.listdir()) app = CompanySelector(root) sv_ttk.set_theme("dark") -- cgit v1.2.3