vn.py量化社区
By Traders, For Traders.
Member
加入于:
帖子: 19
声望: 0
12:36:58    初始化CTA回测引擎
12:36:58    策略文件加载完成
12:36:58    RQData数据接口初始化成功
12:37:20    ----------------------------------------
12:37:20    150019.SZSE-1m开始下载历史数据
12:37:20    数据下载失败,触发异常:
Traceback (most recent call last):
  File "C:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 381, in run_downloading
    data = rqdata_client.query_history(req)
  File "C:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 137, in query_history
    adjust_type="none"
  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\get_price.py", line 121, in get_price
    fields, has_dominant_id = _ensure_fields(fields, MINBAR_FIELDS, stocks, funds, futures, spots, options, convertibles, indexes, repos)
  File "C:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 273, in _ensure_fields
    check_items_in_container(fields, all_fields, "fields")
  File "C:\vnstudio\lib\site-packages\rqdatac\validators.py", line 64, in check_items_in_container
    "{}: got invalided value {}, choose any in {}".format(name, item, should_in)
ValueError: fields: got invalided value open_interest, choose any in {'low', 'high', 'open', 'volume', 'close', 'total_turnover'}

下载期货的没问题。
用vnpy2.08测试都正常

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

交易员, 改成SSE 了触发异常了。。。。,如何解决
我也遇到了同样的问题。。。。。
9:44:30 ----------------------------------------
09:44:30 000002.SSE-d开始下载历史数据
09:44:30 数据下载失败,触发异常:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 381, in run_downloading
data = rqdata_client.query_history(req)
File "D:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 137, in query_history
adjust_type="none"
File "D:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(*args, **kwargs)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 116, in get_price
fields, has_dominant_id = _ensure_fields(fields, DAYBAR_FIELDS, stocks, funds, futures, spots, options, convertibles, indexes, repos)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 273, in _ensure_fields
check_items_in_container(fields, all_fields, "fields")
File "D:\vnstudio\lib\site-packages\rqdatac\validators.py", line 64, in check_items_in_container
"{}: got invalided value {}, choose any in {}".format(name, item, should_in)
ValueError: fields: got invalided value open_interest, choose any in {'total_turnover', 'open', 'volume', 'high', 'num_trades', 'low', 'close'}

09:44:45 ----------------------------------------
09:44:45 000002.SSE-1h开始下载历史数据
09:44:45 数据下载失败,触发异常:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 381, in run_downloading
data = rqdata_client.query_history(req)
File "D:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 137, in query_history
adjust_type="none"
File "D:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(*args, **kwargs)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 121, in get_price
fields, has_dominant_id = _ensure_fields(fields, MINBAR_FIELDS, stocks, funds, futures, spots, options, convertibles, indexes, repos)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 273, in _ensure_fields
check_items_in_container(fields, all_fields, "fields")
File "D:\vnstudio\lib\site-packages\rqdatac\validators.py", line 64, in check_items_in_container
"{}: got invalided value {}, choose any in {}".format(name, item, should_in)
ValueError: fields: got invalided value open_interest, choose any in {'total_turnover', 'open', 'volume', 'high', 'low', 'close'}

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