qq_31302607 2022-11-25 10:31 采纳率: 0%
浏览 0

Python自动化交易

问题遇到的现象和发生背景

刚学python,我是从github下载jqktrader项目,然后导入到pycharm中,自己写了个test.py,
但是运行报错啦。能不能帮忙看下,毫无头绪。

用代码块功能插入代码,请勿粘贴截图
import jqktrader

print('test')

运行结果及报错内容

D:\software\Anaconda\python.exe D:/workspace/pycharm_workspace/jqktrader-main/test/test.py
Traceback (most recent call last):
File "D:\software\Anaconda\lib\ctypes_init_.py", line 121, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'comtypes.POINTER(IUIAutomationElement)'>, <class 'ctypes.c_long'>, <class 'comtypes.automation.tagVARIANT'>), 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/workspace/pycharm_workspace/jqktrader-main/test/test.py", line 3, in
import jqktrader
File "D:\workspace\pycharm_workspace\jqktrader-main\jqktrader_init.py", line 5, in
from jqktrader.api import use
File "D:\workspace\pycharm_workspace\jqktrader-main\jqktrader\api.py", line 5, in
from .clienttrader import ClientTrader
File "D:\workspace\pycharm_workspace\jqktrader-main\jqktrader\clienttrader.py", line 14, in
from pywinauto import findwindows, timings
File "D:\software\Anaconda\lib\site-packages\pywinauto_init
.py", line 89, in
from . import findwindows
File "D:\software\Anaconda\lib\site-packages\pywinauto\findwindows.py", line 42, in
from . import controls
File "D:\software\Anaconda\lib\site-packages\pywinauto\controls_init_.py", line 36, in
from . import uiawrapper # register "uia" back-end (at the end of uiawrapper module)
File "D:\software\Anaconda\lib\site-packages\pywinauto\controls\uiawrapper.py", line 47, in
from ..uia_defines import IUIA
File "D:\software\Anaconda\lib\site-packages\pywinauto\uia_defines.py", line 181, in
pattern_ids = _build_pattern_ids_dic()
File "D:\software\Anaconda\lib\site-packages\pywinauto\uia_defines.py", line 169, in _build_pattern_ids_dic
if hasattr(IUIA().ui_automation_client, cls_name):
File "D:\software\Anaconda\lib\site-packages\pywinauto\uia_defines.py", line 50, in call
cls._instances[cls] = super(_Singleton, cls).call(*args, **kwargs)
File "D:\software\Anaconda\lib\site-packages\pywinauto\uia_defines.py", line 60, in init
self.UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll')
File "D:\software\Anaconda\lib\site-packages\comtypes\client_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "D:\software\Anaconda\lib\site-packages\comtypes\client_generate.py", line 184, in _CreateWrapper
mod = _my_import(fullname)
File "D:\software\Anaconda\lib\site-packages\comtypes\client_generate.py", line 24, in my_import
return import(fullname, globals(), locals(), ['DUMMY'])
File "D:\software\Anaconda\lib\site-packages\comtypes\gen_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py", line 853, in
( ['in'], VARIANT, 'newValue' )),
File "D:\software\Anaconda\lib\site-packages\comtypes_init
.py", line 329, in setattr
self.make_methods(value)
File "D:\software\Anaconda\lib\site-packages\comtypes_init
.py", line 698, in make_methods
prototype = WINFUNCTYPE(restype, *argtypes)
File "D:\software\Anaconda\lib\ctypes_init
.py", line 123, in WINFUNCTYPE
class WinFunctionType(_CFuncPtr):
TypeError: item 3 in argtypes passes a union by value, which is unsupported.

Process finished with exit code 1

我的解答思路和尝试过的方法

Python版本:3.8.3

我想要达到的结果

麻烦帮忙瞅瞅,感谢

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 创建了问题 11月25日

      悬赏问题

      • ¥15 粘贴替换字符串的时候,右边引号会自动换行导致报错
      • ¥15 用verilog HDL语法仿真
      • ¥15 用超表面产生涡旋光束,怎么用matlab代码算得到的涡旋光束的模式纯度
      • ¥40 返乡没拿电脑航班取消被困在机场了,C语言实验ddl要到了
      • ¥15 find 命令优化语句问题
      • ¥15 js 使用contenteditable属性模拟富文本框 实现具体关键字高亮
      • ¥15 QT QList<QLIst<int>> 遍历问题
      • ¥15 关于#C++#2048游戏问题
      • ¥15 这种html怎么制作
      • ¥60 高仿微信的即时通讯app