Description
It worked in 3.7.3, but failed in 3.7.6.
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 18 2019, 23:46:00) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import comtypes
import comtypes.client
comtypes.client.GetModule("UIAutomationCore.dll")
Traceback (most recent call last):
File "D:\Python37\lib\ctypes_init_.py", line 121, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'ctypes.c_long'>, <class 'comtypes.automation.tagVARIANT'>, <class 'comtypes.LP_POINTER(IUIAutomationCondition)'>), 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "D:\Python37\lib\site-packages\comtypes\client_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "D:\Python37\lib\site-packages\comtypes\client_generate.py", line 184, in _CreateWrapper
mod = _my_import(fullname)
File "D:\Python37\lib\site-packages\comtypes\client_generate.py", line 24, in my_import
return import(fullname, globals(), locals(), ['DUMMY'])
File "D:\Python37\lib\site-packages\comtypes\gen_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py", line 1244, in
( ['out', 'retval'], POINTER(POINTER(IUIAutomationElement)), 'element' )),
File "D:\Python37\lib\site-packages\comtypes_init.py", line 329, in setattr
self.make_methods(value)
File "D:\Python37\lib\site-packages\comtypes_init.py", line 698, in make_methods
prototype = WINFUNCTYPE(restype, *argtypes)
File "D:\Python37\lib\ctypes_init.py", line 123, in WINFUNCTYPE
class WinFunctionType(_CFuncPtr):
TypeError: item 2 in argtypes passes a union by value, which is unsupported.