I created an application that reads a text file to get a digit (1 or 0) to execute some code (it runs like a save file since I want the value to be changed permanently, not just while the script is running), but when I use pyinstaller
to convert it to a standalone exe file I get a Fatal Error
saying that it cannot run the script. Previous compilations from before I added this feature worked, so I know it's something to do with reading that text file.
Note: I tried using a .py
file instead of a .txt
. While it worked as a script, the same error came up after compilation.
this is what I type into an elevated command prompt:
pyinstaller --onefile --add-data save.txt;.' file.py