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

FIX: OSError: [WinError 6] The handle is invalid #1066

Closed
shin-illua opened this issue Jan 26, 2020 · 1 comment
Closed

FIX: OSError: [WinError 6] The handle is invalid #1066

shin-illua opened this issue Jan 26, 2020 · 1 comment

Comments

@shin-illua
Copy link

If you every encounter this error in the future, you can try this tweak and see if it works for you. You basically have to edit the subprocess module. NOTE: This is only for windows, haven't tested it on linux. AND USE IT AT YOUR OWN RISK!

  • Open subprocess.py (C:\Python\Python37\Lib\subprocess.py)
  • Find the class definition of Popen:
    image
  • go to def __init__(....): and comment this code:
    image

Furthur reference: https://bugs.python.org/issue37380

@tburrows13
Copy link
Collaborator

Thanks for noting this. I managed to get around it in versions of Python before v3.7 by adding in self.proc.wait() in #1185, so hopefully this issue does not reappear.

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

2 participants