安装过程很正常,但是要启动CtaStretegy 和 CtaBacktester 模块时会触发异常,出现以下报错,其他模块正常,卸掉重装还是一样,不知道什么原因。
系统环境是Win11,曾安装过anaconda,后来卸掉了,有没有可能是python版本冲突造成的?
2022-08-23 10:26:52 Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy\trader\datafeed.py", line 50, in get_datafeed
module: ModuleType = import_module(module_name)
File "C:\veighna_studio\lib\importlib__init__.py", line 126, in import_module
2022-08-23 10:26:52 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 1004, in _find_and_loadunlocked
ModuleNotFoundError: No module named 'vnpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\veighna_studio\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\veighna_studio\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "build\bdist.win-amd64\egg\veighna_station\trader.py", line 39, in <module>
File "build\bdist.win-amd64\egg\veighna_station\trader.py", line 30, in run_trader
File "C:\veighna_studio\lib\site-packages\vnpy\trader\engine.py", line 101, in add_app
engine: BaseEngine = self.add_engine(app.engine_class)
File "C:\veighna_studio\lib\site-packages\vnpy\trader\engine.py", line 72, in add_engine
engine: BaseEngine = engine_class(self, self.event_engine)
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 111, in init
2022-08-23 10:26:52 self.datafeed: BaseDatafeed = get_datafeed()
File "C:\veighna_studio\lib\site-packages\vnpy\trader\datafeed.py", line 52, in get_datafeed
2022-08-23 10:26:52 print(f"\u627e\u4e0d\u5230\u6570\u636e\u670d\u52a1\u9a71\u52a8{module_name}\uff0c\u4f7f\u7528\u9ed8\u8ba4\u7684RQData\u6570\u636e\u670d\u52a1")
File "C:\veighna_studio\lib\encodings\cp1252.py", line 19, in encode
2022-08-23 10:26:52 return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-8: character maps to <undefined>