VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 5
声望: 0

新人,跟着社区的cta视频学习,但是demo_strategy就加载失败了,错误提示如下:
策略文件strategies.demo_strategy加载失败,触发异常:
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 760, in load_strategy_class_from_module
module = importlib.import_module(module_name)
File "C:\vnstudio\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\chenqingde\strategies\demo_strategy.py", line 11
TickData
^
SyntaxError: invalid syntax

Administrator
avatar
加入于:
帖子: 4503
声望: 322

检查下你的第11行代码TickData前后是否有多余的逗号、空格、括号等

Member
avatar
加入于:
帖子: 5
声望: 0

谢谢老大

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】