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

Also define stdin or it will crash on Python + cx_Freeze: WindowsErro… #4503

Merged
merged 1 commit into from
Dec 6, 2017
Merged

Also define stdin or it will crash on Python + cx_Freeze: WindowsErro… #4503

merged 1 commit into from
Dec 6, 2017

Conversation

melroy89
Copy link

Using Python + cx_Freeze will result into an exception:

OSError: [WinError 6] The handle is invalid

This is because there is no stdin defined in the service.py file for the subprocess.Popen() command. Underwater the subprocess tries to create a handle which also looks for stdin under Windows this gets a bit tricky when using Bash or cx_Freeze. So, I defined stdin as well, and the crash is gone. Optionally you can also use:

FNULL = open(os.devnull, 'r')
subprocess.Popen(.... ,stdin=FNULL)

Trying to fix #536 & #547 as well.

@lmtierney lmtierney merged commit d1f4f50 into SeleniumHQ:master Dec 6, 2017
@lmtierney
Copy link
Member

Merged, thank you!

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

Successfully merging this pull request may close these issues.

Error while executing test with more than 5 chrome instances open in Selenium-Python
3 participants