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

在windows server 2019上安装VNSTATION 2.1.1,启动回测报错,错误信息如下。怎么解决?

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
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 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\
init.py", line 9, in <module>
from .engine import CtaEngine
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 39, in <module>
from vnpy.trader.database import database_manager
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\
init.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 10, in init
return init_sql(driver=driver, settings=settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 17, in init_sql
_database_manager = init(driver, settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 33, in init
bar, tick = init_models(db, driver)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 322, in init_models
db.connect()
File "d:\vnstudio\lib\site-packages\peewee.py", line 2993, in connect
self._state.set_connection(self._connect())
File "d:\vnstudio\lib\site-packages\peewee.py", line 3891, in _connect
conn = mysql.connect(db=self.database, **self.connect_params)
File "d:\vnstudio\lib\site-packages\pymysql\
init.py", line 94, in Connect
return Connection(*args, **kwargs)
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 325, in
init__
self.connect()
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 599, in connect
self._request_authentication()
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 882, in _request_authentication
auth_packet = _auth.caching_sha2_password_auth(self, auth_packet)
File "d:\vnstudio\lib\site-packages\pymysql_auth.py", line 264, in caching_sha2_password_auth
data = sha2_rsa_encrypt(conn.password, conn.salt, conn.server_public_key)
File "d:\vnstudio\lib\site-packages\pymysql_auth.py", line 142, in sha2_rsa_encrypt
raise RuntimeError("cryptography is required for sha256_password or caching_sha2_password")
RuntimeError: cryptography is required for sha256_password or caching_sha2_password

Administrator
avatar
加入于:
帖子: 4550
声望: 325

运行这个命令试试:pip install cryptography

似乎你的MySQL开了某种特殊的验证?

Member
avatar
加入于:
帖子: 8
声望: 1

用Python的交易员 wrote:

运行这个命令试试:pip install cryptography

似乎你的MySQL开了某种特殊的验证?

是的,安装cryptography就解决此问题。

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

沪公网安备 31011502017034号

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