新手求组:关于启动后及点击CTA回测出现的一些报错,自己水平有限,查阅资料都没有解决问题,才上来到论坛求组:
第一个是:点击启动后出现:
please migrate to a new time zone provider. For more details on how to do so .......报错
我将 C:\veighna_studio\Lib\site-packages\vnpy\trader\setting.py 变成 "database.timezone": 'Asia/Shanghai'
报错消失,但不知道是否有后续影响
第二个是:点击CTA回测,进入回测界面后,出现以下报错:
vnpy_ctastrategy.strategies.tempCodeRunnerFile加载失败,触发异常:
Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_ctabacktester\engine.py", line 110, in load_strategy_class_from_module
module = importlib.import_module(module_name)
File "C:\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
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\strategies\tempCodeRunnerFile.py", line 1, in <module>
self, cta_engine, strategy_name, vt_symbol, setting
NameError: name 'self' is not defined
第三个是:将自编的CTA策略放入文件夹后,点击CTA回测,不进进入,出现对话框,报错:
Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy\trader\ui\mainwindow.py", line 267, in open_widget
widget = widget_class(self.main_engine, self.event_engine)
File "C:\veighna_studio\lib\site-packages\vnpy_ctabacktester\ui\widget.py", line 52, in init__
self.init_strategy_settings()
File "C:\veighna_studio\lib\site-packages\vnpy_ctabacktester\ui\widget.py", line 60, in init_strategy_settings
setting = self.backtester_engine.get_default_setting(class_name)
File "C:\veighna_studio\lib\site-packages\vnpy_ctabacktester\engine.py", line 257, in get_default_setting
return strategy_class.get_class_parameters()
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\template.py", line 60, in get_class_parameters
class_parameters[name] = getattr(cls, name)
AttributeError: type object 'AtrTreeDome' has no attribute 'datr_multipl'
麻烦、辛苦论坛大神给予提示,我没有办法解决。。。。。