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

策略文件vnpy_ctastrategy.strategies.xxxx加载失败,触发异常:

Traceback (most recent call last):

File "D:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 810, in load_strategy_class_from_module

module: ModuleType = importlib.import_module(module_name)

File "D:\veighna_studio\lib\importlib__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib._bootstrap>", line 1050, in _gcd_import

File "<frozen importlib._bootstrap>", line 1027, in _find_and_load

File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
s
File "<frozen importlib._bootstrap_external>", line 883, in exec_module

File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed

File "D:\veighna_studio\lib\site-packages\vnpy_ctastrategy\strategies\x'x'x'x.py", line 15, in <module>

from vnpy.trader.option_fuction import delta_call, delta_put, calculate_days_to_expiry, dict_price_pos, findvalue

File "D:\veighna_studio\lib\site-packages\vnpy\trader\option_fuction.py", line 5, in <module>

import trading_calendars

ModuleNotFoundError: No module named 'trading_calendars'

是哪里的问题,"engine.py"line810,是名字有问题?

Member
avatar
加入于:
帖子: 1615
声望: 115

option_fuction这个不是开源版自带的模块,是你自己开发的吧?要放到对应位置上

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

收到 谢大佬

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

低级错误

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

2.1.8的老版本里放在vnpy下面的trader里,现在还放在这里不行吗?

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

沪公网安备 31011502017034号

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