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

Not working with Pyinstaller #991

Closed
AlexPaiva opened this issue Dec 19, 2023 · 4 comments · May be fixed by pytest-dev/execnet#238
Closed

Not working with Pyinstaller #991

AlexPaiva opened this issue Dec 19, 2023 · 4 comments · May be fixed by pytest-dev/execnet#238

Comments

@AlexPaiva
Copy link

After adding the correct hooks and module imports on the latest versions of pyinstaller and xdist I run with pytest.main(["-n","2",relative_to_assets('test.py')]) and it just starts a new .exe and once closed gives this error:

platform win32 -- Python 3.10.5, pytest-7.4.3, pluggy-1.3.0
rootdir: C:\Users\AA
plugins: xdist-3.5.0
created: 2/2 workers

But the workers don't actually run, it just opens an extra .exe and then if I close the extra one I get:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "_pytest\main.py", line 269, in wrap_session
INTERNALERROR>   File "pluggy\_hooks.py", line 493, in __call__
INTERNALERROR>   File "pluggy\_manager.py", line 115, in _hookexec
INTERNALERROR>   File "pluggy\_callers.py", line 152, in _multicall
INTERNALERROR>   File "pluggy\_result.py", line 114, in get_result
INTERNALERROR>   File "pluggy\_callers.py", line 77, in _multicall
INTERNALERROR>   File "xdist\dsession.py", line 83, in pytest_sessionstart
INTERNALERROR>   File "xdist\workermanage.py", line 68, in setup_nodes
INTERNALERROR>   File "xdist\workermanage.py", line 68, in <listcomp>
INTERNALERROR>   File "xdist\workermanage.py", line 71, in setup_node
INTERNALERROR>   File "execnet\multi.py", line 133, in makegateway
INTERNALERROR>   File "execnet\gateway_bootstrap.py", line 100, in bootstrap
INTERNALERROR>   File "execnet\gateway_bootstrap.py", line 34, in bootstrap_import
INTERNALERROR>   File "execnet\gateway_base.py", line 476, in read
INTERNALERROR> EOFError: expected 1 bytes, got 0

Seems pyinstaller is not supported? Or?

@RonnyPfannschmidt
Copy link
Member

Nope, it's not supported and it's currently unclear how to support it in execnet

@AlexPaiva
Copy link
Author

Nope, it's not supported and it's currently unclear how to support it in execnet

Seems more like a path issue than anything else no? Or? Any branch currently checking on that? Any starting points you can give me to check this out?

@RonnyPfannschmidt
Copy link
Member

Execnet subprocesses startup is currently completely unaware of pyinstaller, starting the workers is impossible as such

I'm unable to add support due to bandwidth and I'm not aware of anyone else working on it

@AlexPaiva
Copy link
Author

Execnet subprocesses startup is currently completely unaware of pyinstaller, starting the workers is impossible as such

I'm unable to add support due to bandwidth and I'm not aware of anyone else working on it

After pytest-dev/execnet#237 and as explained there with the changes explained there and the sent PR changes: pytest-dev/execnet#238 was able to fix and make it work.

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

Successfully merging a pull request may close this issue.

2 participants