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

vnstudio以及无界面运行两种模式都试过了,主界面能打开,但是每次在配置中输入ricequant的账户和密码(能在官网登陆成功的账户密码),并且重启界面后再去点回测模块就报错,删掉账户和密码就可以正常点开回测模块,但是由于数据库中没有数据,因此无法回测。
配置rqdata账户和密码再点CTA回测模块报错代码如下:
D:\vnpy>python run.py
D:\Anaconda3\lib\site-packages\deap\tools_hypervolume\pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow.
"module. Expect this to be very slow.", ImportWarning)
Traceback (most recent call last):
File "D:\vnpy\vnpy\trader\ui\mainwindow.py", line 221, in open_widget
widget = widget_class(self.main_engine, self.event_engine)
File "D:\vnpy\vnpy\app\cta_backtester\ui\widget.py", line 41, in init
self.backtester_engine.init_engine()
File "D:\vnpy\vnpy\app\cta_backtester\engine.py", line 60, in init_engine
self.init_rqdata()
File "D:\vnpy\vnpy\app\cta_backtester\engine.py", line 66, in init_rqdata
result = rqdata_client.init()
File "D:\vnpy\vnpy\trader\rqdata.py", line 51, in init
df = rqdata_all_instruments(date=datetime.now())
File "D:\Anaconda3\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(args, **kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\services\basic.py", line 319, in all_instruments
ins_ret = filter(cond, _all_instruments_list(market))
File "D:\Anaconda3\lib\site-packages\rqdatac\decorators.py", line 111, in wrapper
value = user_function(
args, kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\services\basic.py", line 107, in _all_instruments_list
return [Instrument(i) for i in get_client().execute("all_instruments", market)]
File "D:\Anaconda3\lib\site-packages\rqdatac\decorators.py", line 59, in wrap
return func(*args,
kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\thread_local.py", line 43, in execute
return self._execute(self._get_connection(), method, args, kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\thread_local.py", line 29, in _get_connection
self._local.connection = Connection(s, self._auth)
File "D:\Anaconda3\lib\site-packages\rqdatac\connection.py", line 67, in init
self._do_auth(self._auth_info)
File "D:\Anaconda3\lib\site-packages\rqdatac\connection.py", line 112, in _do_auth
msg_type, body = self._read_one_packet()
File "D:\Anaconda3\lib\site-packages\rqdatac\connection.py", line 102, in _read_one_packet
raise get_error(code)(msg)
rqdatac.share.errors.AuthenticationFailed: authentication failed.
D:\Anaconda3\lib\site-packages\rqdatac\client.py:166: UserWarning: rqdatac is already inited. Settings will be changed.
warnings.warn("rqdatac is already inited. Settings will be changed.", stacklevel=0)
Traceback (most recent call last):
File "D:\vnpy\vnpy\trader\ui\mainwindow.py", line 221, in open_widget
widget = widget_class(self.main_engine, self.event_engine)
File "D:\vnpy\vnpy\app\cta_strategy\ui\widget.py", line 37, in init
self.cta_engine.init_engine()
File "D:\vnpy\vnpy\app\cta_strategy\engine.py", line 108, in init_engine
self.init_rqdata()
File "D:\vnpy\vnpy\app\cta_strategy\engine.py", line 130, in init_rqdata
result = rqdata_client.init()
File "D:\vnpy\vnpy\trader\rqdata.py", line 51, in init
df = rqdata_all_instruments(date=datetime.now())
File "D:\Anaconda3\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(args, **kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\services\basic.py", line 319, in all_instruments
ins_ret = filter(cond, _all_instruments_list(market))
File "D:\Anaconda3\lib\site-packages\rqdatac\decorators.py", line 111, in wrapper
value = user_function(
args, kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\services\basic.py", line 107, in _all_instruments_list
return [Instrument(i) for i in get_client().execute("all_instruments", market)]
File "D:\Anaconda3\lib\site-packages\rqdatac\decorators.py", line 59, in wrap
return func(*args,
kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\thread_local.py", line 43, in execute
return self._execute(self._get_connection(), method, args, kwargs)
File "D:\Anaconda3\lib\site-packages\rqdatac\thread_local.py", line 29, in _get_connection
self._local.connection = Connection(s, self._auth)
File "D:\Anaconda3\lib\site-packages\rqdatac\connection.py", line 67, in init
self._do_auth(self._auth_info)
File "D:\Anaconda3\lib\site-packages\rqdatac\connection.py", line 112, in _do_auth
msg_type, body = self._read_one_packet()
File "D:\Anaconda3\lib\site-packages\rqdatac\connection.py", line 102, in _read_one_packet
raise get_error(code)(msg)
rqdatac.share.errors.AuthenticationFailed: authentication failed.

P.S.数据库的配置如下,都是真实存在的数据库,猜想是否这里有问题?
"database.driver": "mysql",
"database.database": "vnpy-ag",
"database.host": "localhost",
"database.port": 3306,
"database.user": "root",
"database.password": "123456",
"database.authentication_source": "admin"

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

RQData的账号密码是需要申请试用或者购买的,不是RiceQuant官网的账号

购买链接:https://www.ricequant.com/purchase#1

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