poker_ai
poker_ai copied to clipboard
Fix Issue #108
…stions/60691363/runtimeerrorfreeze-support-on-mac#:~:text=This%20probably%20means%20that%20you,frozen%20to%20produce%20an%20executable.
I've added the code changes to local copy and I'm still getting the following runtime error
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
I found a very simple solution (comment by Ofer) that works on windows (and perhaps on other OSes as well).
In bin\poker_ai
, move the condition to the top of the code, like so:
#!/usr/bin/env python
if __name__ == "__main__":
from poker_ai.cli.runner import cli
cli()