我用的是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.
有朋友能帮忙吗
这是在更高版本(3.7.7+或3.8.2+)中修复的已知Python错误。请看我的答案:Getting error while running a script which uses pywinauto
请注意,您可能需要安装较新的Python
相关问题 更多 >
编程相关推荐