Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stockfish .EXE Does Not Run in Background Upon PyInstaller Packaging #40

Closed
hebozhe opened this issue Nov 16, 2020 · 1 comment
Closed

Comments

@hebozhe
Copy link

hebozhe commented Nov 16, 2020

I had a look at models.py, and it doesn't seem like it's built to open and run stockfish_<version>.exe in the background, though it does from the PyCharm IDE.

The --noconsole command doesn't seem to apply to dependent executables.

Is there a snippet that one could add to make sure that the executable never displays a console?

@hebozhe
Copy link
Author

hebozhe commented Nov 17, 2020

Solution:

Change...

self.stockfish = subprocess.Popen(
            path, universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE
        )

to...

self.stockfish = subprocess.Popen(
            path, universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True 
        )

@hebozhe hebozhe closed this as completed Nov 17, 2020
johndoknjas added a commit to johndoknjas/stockfish-1 that referenced this issue May 31, 2023
* Add ': Stockfish' type hints in test_models.py.

* Fix mypy errors.

* Add various type hints in models.py.

* Minor test_models.py updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant