vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 4
声望: 0

亲爱的开发者,
我是个beginner+noob.
VN Trader之前运行过,不过今天刚跟着课程做了个demo strategy,尝试backtesting时无法加载VN Trader 选择的Bitmex + CTAstrategy + CTAbacktester
出现触发异常。
以下是log内容,我也看不懂,求助大神帮我解决,也不知道是不是我在写demo时动了什么。。我尝试重新安装vn studio也无济于事。

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnstation\cli.py", line 80, in run_trader
main_engine.add_app(app)
File "C:\vnstudio\lib\site-packages\vnpy\trader\engine.py", line 87, in add_app
engine = self.add_engine(app.engine_class)
File "C:\vnstudio\lib\site-packages\vnpy\trader\engine.py", line 62, in add_engine
engine = engine_class(self, self.event_engine)
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 48, in init
self.load_strategy_class()
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 86, in load_strategy_class
self.load_strategy_class_from_folder(path2, "strategies")
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 101, in load_strategy_class_from_folder
self.load_strategy_class_from_module(strategy_module_name)
UnboundLocalError: local variable 'strategy_module_name' referenced before assignment

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

彻底删除后重新安装 问题解决了,虽然还不知道是什么原因导致的

Administrator
avatar
加入于:
帖子: 1908
声望: 85

估计就是什么原因破坏了vnpy的源代码文件导致的了。。。解决了就好

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