按照微信公众号里创建的第一个演示策略,全是安装步骤进行的,却无法加载,报错如下:
策略文件strategies.demo_strategy加载失败,触发异常:
Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 814, in load_strategy_class_from_module
module = importlib.import_module(module_name)
File "d:\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 "D:\VN\strategies\demo_strategy.py", line 14
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd1 in position 0: invalid continuation byte