-
Notifications
You must be signed in to change notification settings - Fork 833
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
[BUG] 1.30 & 1.31 cmd open up with headless (pyinstaller) #1778
Comments
to reproduce:
expected: no window to fix it we could add |
1.31.1 will have less/no windows on windows with normal setup. The pythonw issue still remains. |
Is there any fix available for the cmd window pop ups? |
Not yet, but you can edit the |
Thank you, this works fantasic! |
This is the constant |
We should probably do the following: startupinfo = None
if sys.platform == "win32":
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
self._proc = await asyncio.create_subprocess_exec(
str(self._driver_executable),
"run-driver",
stdin=asyncio.subprocess.PIPE,
stdout=asyncio.subprocess.PIPE,
stderr=_get_stderr_fileno(),
limit=32768,
env=env,
startupinfo=startupinfo,
) |
Hello thank you for this snippet, it would be awesome if you add this in the following versions of Playwright. |
Using playwright with headless mode. When I run the script without builded edition it runs fine in headless mode, no popup, no nothing. However, when I build with pyinstaller and I also use these flags:
--noconsole --excelude-module cmd -F
and usingwith sync_playwright() as p:
in 1.30 and 1.31 cmds popping up. In 1.30 only one empty cmd pops up, in 1.31 multiple windows appear. If I revert back to 1.29 this problem does not occur.The text was updated successfully, but these errors were encountered: