You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
======================================================================
ERROR: test_wmi_query_os_version (test.test_wmi.WmiTests.test_wmi_query_os_version)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\1\b\layout-appx-win32\Lib\test\test_wmi.py", line 16, in test_wmi_query_os_version
r = _wmi.exec_query("SELECT Version FROM Win32_OperatingSystem").split("\0")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError -2147417831] Security must be initialized before any interfaces are marshalled or unmarshalled. It cannot be changed once initialized
======================================================================
ERROR: test_wmi_query_repeated (test.test_wmi.WmiTests.test_wmi_query_repeated)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\1\b\layout-appx-win32\Lib\test\test_wmi.py", line 28, in test_wmi_query_repeated
self.test_wmi_query_os_version()
File "D:\a\1\b\layout-appx-win32\Lib\test\test_wmi.py", line 16, in test_wmi_query_os_version
r = _wmi.exec_query("SELECT Version FROM Win32_OperatingSystem").split("\0")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError -2147417831] Security must be initialized before any interfaces are marshalled or unmarshalled. It cannot be changed once initialized
======================================================================
FAIL: test_wmi_query_repeated_error (test.test_wmi.WmiTests.test_wmi_query_repeated_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\1\b\layout-appx-win32\Lib\test\test_wmi.py", line 42, in test_wmi_query_repeated_error
self.test_wmi_query_error()
File "D:\a\1\b\layout-appx-win32\Lib\test\test_wmi.py", line 38, in test_wmi_query_error
self.fail("Expected OSError")
AssertionError: Expected OSError
----------------------------------------------------------------------
Ran 4 tests in 0.047s
Traceback (most recent call last):
FAILED (failures=1, errors=2)
test test_wmi failed
1 test failed again:
test_wmi
The text was updated successfully, but these errors were encountered:
Maybe _wmi could ignore RPC_E_TOO_LATE when calling CoInitializeSecurity(). The process-wide security for COM may have already been set by the application or another extension module. However security was initialized, hopefully it allows connecting to the WMI server.
Maybe _wmi could ignore RPC_E_TOO_LATE when calling CoInitializeSecurity().
That's what I was thinking. I saw this error pop up a few times while testing, but couldn't reproduce it consistently (apart from when I broke the CoUninitialize call...).
My worry with ignoring this error code is that we might just fail at the next step anyway. In "real life" this is fine, because platform has fallbacks, but if it's going to break tests then it'll be harder to keep things reliable.
zooba
added a commit
to zooba/cpython
that referenced
this issue
Sep 8, 2022
It started to happen after de33df2
CC @zooba
Link: https://dev.azure.com/Python/cpython/_build/results?buildId=111384&view=logs&j=0fcf9c9b-89fc-526f-8708-363e467e119e&t=fa5ef4ee-3911-591e-4444-19482ab189b7&l=244
The text was updated successfully, but these errors were encountered: