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

vnpy@vnpy-VirtualBox:~/vnpy/examples/RQData$ python run.py
/home/vnpy/anaconda2/lib/python2.7/site-packages/qdarkstyle/init.py:214: FutureWarning: load_stylesheet() will not receive pyside parameter in version 3. Set QtPy environment variable to specify the Qt binding insteady.
FutureWarning
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/vnpy/anaconda2/lib/python2.7/threading.py", line 801, in bootstrap_inner
self.run()
File "/home/vnpy/anaconda2/lib/python2.7/threading.py", line 754, in run
self.
target(self.args, **self.kwargs)
File "run.py", line 239, in run
self.downloadBar(symbol, '1m')
File "run.py", line 176, in downloadBar
end_date=datetime.now())
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/rqdatac/decorators.py", line 133, in wrap
return func(
args, kwargs)
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/rqdatac/services/get_price.py", line 111, in get_price
pf = get_minbar(order_book_ids, start_date, end_date, fields, duration, market)
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/rqdatac/services/get_price.py", line 384, in get_minbar
.astype({i: "f8" for i in fields})
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/pandas/core/generic.py", line 2947, in astype
raise_on_error=raise_on_error,
kwargs)
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/pandas/core/internals.py", line 2873, in astype
return self.apply('astype', dtype=dtype, kwargs)
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/pandas/core/internals.py", line 2832, in apply
applied = getattr(b, f)(
kwargs)
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/pandas/core/internals.py", line 422, in astype
values=values, **kwargs)
File "/home/vnpy/anaconda2/lib/python2.7/site-packages/pandas/core/internals.py", line 437, in _astype
dtype = np.dtype(dtype)
File "/home/vnpy/.local/lib/python2.7/site-packages/numpy/core/_internal.py", line 62, in _usefields
names, formats, offsets, titles = _makenames_list(adict, align)
File "/home/vnpy/.local/lib/python2.7/site-packages/numpy/core/_internal.py", line 32, in _makenames_list
raise ValueError("entry not a 2- or 3- tuple")
ValueError: entry not a 2- or 3- tuple

请教这个是怎么回事啊,还有就是米筐的代码跟vn.py的代码不一样,比如PTA1909米筐的代码是TA0909,VN.PY的代码是TA909,保存到数据库里也是两个代码,这个数据回测和实盘的时候能用吗

Administrator
avatar
加入于:
帖子: 2152
声望: 99

兼容性问题吧,升级下版本或者放到windows上测试下

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

谢谢,用的是ubuntu16.04,vnpy1.9.2,vnpy再升级就只能用python3版本了,目前还不想升,是否想用ricequant data只能用windows了

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