Hello, One of my pyinstaller applications is built on PyQt with the onefile option and it is long-running (i.e. like an email client or web browser). Recently I heard a few reports from Mac OSX users who received backtraces like the following one after a couple days of inactivity:
[Errno 2] No such file or directory: '/var/folders/55/7thjstm13j55nqmd4npdjkm80000gn/T/_MEIQMoBjg/<redacted>' So, the temporary files extracted by the pyinstaller frozen binary were deleted from disk while the application was still running. It turns out, files under /var/folders on recent OSX systems can be subject to auto-purging if they're not used. For example, see http://blog.magnusviri.com/what-is-var-folders.html. In particular: "_CS_DARWIN_USER_TEMP_DIR - Provides the path to a user's temporary items directory....By default, files in this location may be cleaned (removed) by the system if they are not accessed in 3 days." This /var/folders sub directory is also returned by Python's tempfile.gettempdir() API, which I assume is how (either directly or indirectly) how pyinstaller determines where to store the temp files. I know you can set the temporary path by just assigning a value to tempfile.tempdir (see https://docs.python.org/2/library/tempfile.html) but how would we do this for frozen pyinstaller binaries? Would we hook into it's runtime component somehow or would we need to edit some code before building the binary? For another description of a similar issue, see http://lists.apple.com/archives/cocoa-dev/2009/Jan/msg01595.html. As it states, you can manually edit your /System/Library/LaunchDaemons/com.apple.bsd.dirhelper.plist file and increase the value of CLEAN_FILES_OLDER_THAN_DAYS to something greater than 3. I would like to save this as an absolute last resort, since it would prevent purging of all other application's files and defeat the purpose of the dirhelper service. Thoughts? Thank you! -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/d/optout.
