settings.txt is stored and accessed within the compiled single file app, but it\'s not being written to. This works prior to Pyinstaller compilation when the file is in the
If you are on Windows, _MEIPASS
returns the "short" name for the path in case that any component of it is more than 8 characters long. So, to test that this is the issue, try to make it a one-folder
frozen app and then move it in a simple and short path: e.g., C:/test
.
If this is the issue, you can workaround the problem by retrieving the long path using something like:
if hasattr(sys, '_MEIPASS'):
import win32api
sys_meipass = win32api.GetLongPathName(sys._MEIPASS)