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

问题简述:全部最新版的vnstudio vnpy。不能在回测中下载小时分钟数据。但是可以下载日线数据。rqdata单独python命令行下可以正常取相同时间跨度日线,小时,分钟数据。

官网下载最新的vnstudio 2.0.8
下载完后 github 下载了最新的vnpy master
并更vnstudio vnpy.
pip list 显示 vnpy 2.0.8
点击进入cta回测。 点击数据下载
下载出现问题:
13:55:05 初始化CTA回测引擎
13:55:05 策略文件加载完成
13:55:05 RQData数据接口初始化成功
13:55:09 ----------------------------------------
13:55:09 IF88.CFFEX-1m开始下载历史数据
13:55:09 数据下载失败,触发异常:
Traceback (most recent call last):
File "D:\vnstudio1\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 381, in run_downloading
data = rqdata_client.query_history(req)
File "D:\vnstudio1\lib\site-packages\vnpy\trader\rqdata.py", line 136, in query_history
adjust_type="none"
File "D:\vnstudio1\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(args, **kwargs)
File "D:\vnstudio1\lib\site-packages\rqdatac\services\get_price.py", line 117, in get_price
pf = get_minbar(order_book_ids, start_date, end_date, fields, duration, market)
File "D:\vnstudio1\lib\site-packages\rqdatac\services\get_price.py", line 433, in get_minbar
"get_minbar_v", order_book_ids, start_date, end_date, fields, duration, market
File "D:\vnstudio1\lib\site-packages\rqdatac\decorators.py", line 59, in wrap
return func(
args, **kwargs)
File "D:\vnstudio1\lib\site-packages\rqdatac\connection_pool.py", line 25, in execute
with self._get_connection() as conn:
File "D:\vnstudio1\lib\contextlib.py", line 112, in enter
return next(self.gen)
File "D:\vnstudio1\lib\site-packages\rqdatac\connection_pool.py", line 36, in _get_connection
conn = self._ensure_connection()
File "D:\vnstudio1\lib\site-packages\rqdatac\connection_pool.py", line 52, in _ensure_connection
if conn.is_nomal():
AttributeError: 'Connection' object has no attribute 'is_nomal'

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

问题己经解决。connection_pool.py conn.isnormal() 拼错了。

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