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

Fix Issue #108#123

Open
alexandermaas wants to merge 1 commit into
fedden:developfrom
alexandermaas:fix/osx-EOFError-after-pip-install
Open

Fix Issue #108#123
alexandermaas wants to merge 1 commit into
fedden:developfrom
alexandermaas:fix/osx-EOFError-after-pip-install

Conversation

@alexandermaas

Copy link
Copy Markdown

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

@CLAassistant

CLAassistant commented Nov 23, 2020

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kabua

kabua commented Aug 3, 2021

Copy link
Copy Markdown

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

kabua commented Aug 3, 2021

Copy link
Copy Markdown

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