Skip to content

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.

@p0deje p0deje added C-py Python Bindings Z-awaiting review Archived: use GitHub review assignments labels Aug 18, 2017
@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

Labels

C-py Python Bindings Z-awaiting review Archived: use GitHub review assignments

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