Invalid Handle Error in Windows 11

Omer Dayan 1 Reputation point
2021-11-24T13:44:52.237+00:00

Hey,

Since the release of Windows 11, I've been trying to run some automation code on this OS, but I'm inconsistently getting this error when trying to run some different CMD commands using subprocess.Popen in Python3 -

[WinError 6] The handle is invalid

I scouted all around the internet but only found solutions to this problem on Windows 10, but performing them didn't help. Does anybody have an idea as to what causes this and how can the issue be resolved? Thank you in advance!

Some of the solutions I've tried -

https://appuals.com/the-handle-invalid/

http://windowsbulletin.com/repair-windows-login-the-handle-is-invalid-error-message-solved/

https://www.majorgeeks.com/content/page/the_handle_is_invalid_error_on_windows_10.html

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Reza-Ameri 17,341 Reputation points Volunteer Moderator
    2021-12-13T15:49:00.557+00:00

    In this case, try open start and search for feedback and open the Feedback Hub app and report this issue.
    Try check with the python community too.

    0 comments No comments

  2. Limitless Technology 39,926 Reputation points
    2021-12-15T15:29:17.81+00:00

    As this is a problem within Windows 11, I recommend that you create a question on the Windows 11 team forum, this way you will receive a better answer on how to solve your problem.

    To do this, access the link below and select the option "Ask a question" from the top menu and describe the entire problem, including images:

    https://answers.microsoft.com/en-us/windows/forum/windows_11?sort=LastReplyDate&dir=Desc&tab=All&status=all&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=all&isFilterExpanded=false&page=1


    --If the answer is helpful, please vote positively and accept the answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.