Repository navigation
Git.AutoInterrupt.__del__() OSError: [WinError 6] The handle is invalid #935
Description
Activity
Thanks for posting, and for making it easy to reproduce for those with access to a windows machine.
Personally I am not among them, but hope that those with a similar issue can chime in to help get this resolved.
I'm working on this. It seems that the easy fix is to just wrap
proc.poll()in a try/except. I'm not sure if that's what you'd want. The harder part is adding a test. My situation seems to be particular and testing for the issue might be complicated. If you're okay with it, I'd like to submit a PR with this simple solution and no test.Here are links to the diffs:
master...bthayer2365:WinError6
master...bthayer2365:WinError6_testThe WinError6 branch solves the problem, but the WinError6_test branch is very much incomplete.
Reacted by Sebastian Thiel@bthayer2365 Thanks for posting the fix, and I absolutely agree that in this case, a test will be difficult to produce given the specificity of the issue. The log will help to get some sort of hint why it is what it is, in case it poses problems to some in future.
Thanks a lot for contributing :)!Great, glad we're on the same page! Thanks for merging. May I ask when I can expect to see this in a release?
v3.0.4 was released yesterday, and I would collect a few more fixes before releasing v3.0.5. If things are pressing on your end, please let me know and I can certainly v3.0.5 early.
Nothing too pressing for me, everything works, just get that ugly-looking error message every time. Many users will have no idea about the issue anyways, but it'll be fixed as soon as you release this fix, and then I'll just add the requirement that GitPython be >= v3.0.5
Hi @Byron I'm at the point where I want to start advertising Git Gud to more people. It would be great if this bug was fixed when people installed it. Could you push v3.0.5?
@bthayer2365 Thanks for the nudge :) - it's done, and v3.0.5 was just released to PyPi. The best of success!
When ready, feel free to add Git Gud to the list of projects that use GitPython in this repository's README file.
@Byron thank you! You already merged the PR with my project, so we should be good!


I'm getting this error on the multiple windows machines I've tested this on. I'm working on an open source project, so it should be relatively easy to reproduce although I'm not sure on how easy it'd be to fix.
I'm using Python 3.7.4
Link to my repo: https://github.com/bthayer2365/git-gud
Here is the full error:
How to reproduce:
python -m gitgud startcalls the same function thatgit gud load introdoes.