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

vnpy2.1.3安装后,启动vnstation,点击VN Trader Pro,第一次能进,第二次勾选了DataRecorder行情记录模块,

description

就不再显示界面了,再点就是

description

请问怎么解决

Member
avatar
加入于:
帖子: 38
声望: 6

退出VN Station,重新登录。

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

这个问题已经困扰了我很久了,我连系统都重装过了,完全干净的win10,也没有解决这个问题,是不是mongoDB没有配置好

Administrator
avatar
加入于:
帖子: 4214
声望: 240

在cmd中用python -m vnstation启动,正常操作,然后看看有没有什么报错

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

用Python的交易员 wrote:

在cmd中用python -m vnstation启动,正常操作,然后看看有没有什么报错
在CMD运行时,窗口如下提示:
Microsoft Windows [版本 10.0.18363.836]
(c) 2019 Microsoft Corporation。保留所有权利。

C:\Users\cbg88>python -m vnstation
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_ciphersuites
qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
js: Mixed Content: The page at 'https://www.vnpy.com/portal/' was loaded over HTTPS, but requested an insecure image 'http://img.blog.itpub.net/blog/2019/07/26/3475241854ce7087.png?x-oss-process=style/bb'. This content should also be served over HTTPS.
js: Mixed Content: The page at 'https://www.vnpy.com/portal/' was loaded over HTTPS, but requested an insecure image 'http://img.blog.itpub.net/blog/2019/07/26/ee0755347d2ede6c.png?x-oss-process=style/bb'. This content should also be served over HTTPS.
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
js: Mixed Content: The page at 'https://www.vnpy.com/portal/' was loaded over HTTPS, but requested an insecure image 'http://img.blog.itpub.net/blog/2019/07/26/3475241854ce7087.png?x-oss-process=style/bb'. This content should also be served over HTTPS.
js: Mixed Content: The page at 'https://www.vnpy.com/portal/' was loaded over HTTPS, but requested an insecure image 'http://img.blog.itpub.net/blog/2019/07/26/ee0755347d2ede6c.png?x-oss-process=style/bb'. This content should also be served over HTTPS.

Administrator
avatar
加入于:
帖子: 4214
声望: 240

这个是QT的一个提示信息,不是报错,忽略即可

Administrator
avatar
加入于:
帖子: 4214
声望: 240

点击启动VN Trader Pro,看看有什么别的报错不

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

点击启动VN Trader Pro后就没有任何提示了,左上角一个黑窗口一闪就不见了,看不清窗口是什么。

Administrator
avatar
加入于:
帖子: 4214
声望: 240

在cmd里用python -m vnstation命令启动VN Station,然后正常操作,出错后看看cmd有什么报错输出贴在这里

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

在没有改动任何设置之前,启动时不能勾选策略,如果勾选任意一个策略,就看不到窗口,接口可以勾选,CMD窗口也没有异常
C:\Windows\system32>python -m vnstation
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_ciphersuites
qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback

后来修改了全局配置里的一个地方,数据库引擎,原来是mySQL,改成MongoDB,CMD窗口出现错误提示,应该是全局配置引起的
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "C:\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 "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\
init.py", line 9, in <module>
from .engine import CtaEngine
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 40, in <module>
from vnpy.trader.database import database_manager
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\
init.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 6, in init
driver = Driver(settings["driver"])
File "C:\vnstudio\lib\enum.py", line 309, in
call
return cls.
new(cls, value)
File "C:\vnstudio\lib\enum.py", line 543, in
new
return cls.missing(value)
File "C:\vnstudio\lib\enum.py", line 556, in missing
raise ValueError("%r is not a valid %s" % (value, cls.
name__))
ValueError: 'MongoDB' is not a valid Driver

同时,运行界面弹出触发异常窗口:
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "C:\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 "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\
init.py", line 9, in <module>
from .engine import CtaEngine
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 40, in <module>
from vnpy.trader.database import database_manager
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\
init.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 6, in init
driver = Driver(settings["driver"])
File "C:\vnstudio\lib\enum.py", line 309, in
call
return cls.
new(cls, value)
File "C:\vnstudio\lib\enum.py", line 543, in
new
return cls.missing(value)
File "C:\vnstudio\lib\enum.py", line 556, in missing
raise ValueError("%r is not a valid %s" % (value, cls.
name__))
ValueError: 'MongoDB' is not a valid Driver

目前使用的是MongoDB,新安装的,已经启动为服务,根据VN文档,使用MongoDB应该使用接口引擎是mySQL
MongoDB¶
需要填写以下字段:

字段名 值 是否必填
database.driver "mysql"或"postgresql" 必填

请教老大,怎么办

Administrator
avatar
加入于:
帖子: 4214
声望: 240

使用MongDB的话,database.driver应该填mongodb,看的哪里文档写的是MySQL?我们来改下

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

用Python的交易员 wrote:

使用MongDB的话,database.driver应该填mongodb,看的哪里文档写的是MySQL?我们来改下
老大,在这里 https://www.vnpy.com/docs/cn/index.html
数据库配置里,关于MongoDB的部分,不带认证的

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

用Python的交易员 wrote:

使用MongDB的话,database.driver应该填mongodb,看的哪里文档写的是MySQL?我们来改下
老大,再请教一下,我用trojan-QT5启动sock5代理上网,但还是报错,听说只支持Shadowsocks,是吗?

Administrator
avatar
加入于:
帖子: 4214
声望: 240

Trojan也可以的,但是默认端口不是1080,而是1081,所以你要改下

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

用Python的交易员 wrote:

Trojan也可以的,但是默认端口不是1080,而是1081,所以你要改下
请问修改哪个文件,是不是在连接API的时候填的那个代理

Administrator
avatar
加入于:
帖子: 4214
声望: 240

对的

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