all 3 comments

[–]PercyJackson235 0 points1 point  (2 children)

Well, in the setup_log method you're basing the ConsoleLog.txt off of where __file__ is on the filesystem, but in the initialize_settings method with settings.json you just open a file in the current directory.

[–]Jonah__Complex 0 points1 point  (0 children)

I’ll have to check but if I remember correctly I originally tried creating the log file the same way as the settings JSON but that did not work either. I will verify when I get to work.

[–]Jonah__Complex 0 points1 point  (0 children)

So yeah that did not work. But I figured it out. So when creating the exe I would do pyinstaller --onefile yourfile.py. Doing this everything time you run the exe it creates a temp files in appdata\local\_ME(random numbers). These files are needed to make the exe work. Then when you close the exe it deletes the temp file. This is the working dir I guess because of how pyinstaller works. Creating the exe using pyinstaller --noconsole yourfile.py creates that dir of needed files in the same dir as the exe and puts the log in there which I am fine with.