Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Fix Issue #108 #123

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alexandermaas
Copy link

…stions/60691363/runtimeerrorfreeze-support-on-mac#:~:text=This%20probably%20means%20that%20you,frozen%20to%20produce%20an%20executable.

@CLAassistant
Copy link

CLAassistant commented Nov 23, 2020

CLA assistant check
All committers have signed the CLA.

@kabua
Copy link

kabua commented Aug 3, 2021

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.

@kabua
Copy link

kabua commented Aug 3, 2021

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()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants