【发布时间】:2020-11-10 10:03:06
【问题描述】:
我正在使用 pywinauto。
Python 3.7.6 pywinauto 0.6.8
导入 pywinauto 模块没有问题,但有以下问题:
代码:
from pywinauto.application import Application
app = Application(backend="uia").start("thinkorswim.exe")
结果:
Traceback (most recent call last):
File "C:\Users\willi\AppData\Local\Programs\Python\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:
prototype = WINFUNCTYPE(restype, *argtypes)
File "C:\Users\willi\AppData\Local\Programs\Python\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.
有朋友可以帮忙吗?
【问题讨论】:
标签: python python-3.x pyautogui pywinauto