Closed jwelch1324 closed 5 years ago
Problem was indeed a missing thespian module dependency (though which one exactly I am not sure)
The solution is to create a hook file for the thespian library as follows
# hook-thespian.py
# Adds hidden imports to support thespian in the pyinstaller build
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = []
for mod in collect_submodules('thespian'):
if not mod.startswith('thespian.test'):
hiddenimports.append(mod)
Then somewhere in the toplevel application file include the line
import thespian
Then running pyinstaller with the command line
>pyinstaller --additional-hooks-dir=hooks Application.py
where hooks is the directory containing hook-thespian.py will produce an standalone executable that runs as expected.
Works with all the multiproc bases.
When running my program using the standard python command
Everything runs smoothly, and I get the expected output
Each of the 'Loading Application.py' is just to tell me when each process is loading the file.
For reference here is the source for collector.py that launches the actorsystem.
However, if I now build a standalone application with pyinstaller using just the basic command
The build proceeds as normal, but when I run the application I get the following exception
And this continues over and over until I force quit the process
If instead of using multiprocTCPBase, I use the simpleSystemBase, everything runs as expected.
I have tried the suggestions that I could find such as killing all python processes and restarting machine to clear any potentially hung admin processes. However the fact that it works when I run it from the command line suggests it is something happening in the pyinstaller process... a missing dependency perhaps?