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

如题。
我想在同一台电脑上进行实盘交易和模拟仿真,都是使用无ui的进程。但是开第二个进程的时候出问题了:

启动CTA策略守护父进程
启动子进程
子进程启动成功
2019-12-18 14:43:04,133 INFO: 主引擎创建成功
2019-12-18 14:43:04,136 INFO: 注册日志事件监听
2019-12-18 14:43:04,136 INFO: 连接CTP接口
2019-12-18 14:43:04,158 INFO: 交易服务器连接成功
2019-12-18 14:43:04,162 INFO: 行情服务器连接成功
2019-12-18 14:43:04,258 INFO: 交易服务器授权验证成功
2019-12-18 14:43:04,258 INFO: 行情服务器登录成功
2019-12-18 14:43:04,264 INFO: 交易服务器登录成功
2019-12-18 14:43:04,290 INFO: 结算信息确认成功
2019-12-18 14:43:04,583 INFO: 合约信息查询成功
Process Process-1:
Traceback (most recent call last):
File "C:\vnstudio\lib\multiprocessing\process.py", line 297, in _bootstrap
self.run()
File "C:\vnstudio\lib\multiprocessing\process.py", line 99, in run
self._target(self._args, **self._kwargs)
File "C:\Users\Administrator\Desktop\test_run.py", line 56, in run_child
cta_engine.init_engine()
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 106, in init_engine
self.init_rqdata()
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 128, in init_rqdata
result = rqdata_client.init()
File "C:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 60, in init
df = rqdata_all_instruments()
File "C:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(
args, kwargs)
File "C:\vnstudio\lib\site-packages\rqdatac\services\basic.py", line 320, in all_instruments
ins_ret = filter(cond, _all_instruments_list(market))
File "C:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 111, in wrapper
value = user_function(*args,
kwargs)
File "C:\vnstudio\lib\site-packages\rqdatac\services\basic.py", line 108, in _all_instruments_list
return [Instrument(i) for i in get_client().execute("all_instruments", market=market)]
TypeError: 'NoneType' object is not iterable

是我的代码出问题还是rqdata的账号只能连接一次?还是别的什么问题?

Administrator
avatar
加入于:
帖子: 4040
声望: 223

测试用的RQData账号,同一时间只能登录一个

Member
加入于:
帖子: 78
声望: 0

如果是买的一年的账号可以同时登陆两个吗?

Administrator
avatar
加入于:
帖子: 4040
声望: 223

一年正式版的账号应该是可以多个登录,具体几个请问下米筐确认吧

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