VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 5
声望: 0

测试了wind和tinysoft的datafeed配置,都是连通可获取数据的。
description
description

(可以获得BarData数据,TickData数据获取报错,图为配置tinysoft)
(配置wind的datafeed情况下,也是只能获得BarData,TickData获取为空)
直接在notebook中使用wind/tinysoft对应的api,都可以正常获取tick数据。

但在datamanager和ctabacktester中无法下载数据。

description

Traceback (most recent call last):
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 3160, in execute_sql
    cursor.execute(sql, params or ())
sqlite3.OperationalError: table dbbardata has no column named turnover

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\program files\vnstudio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 609, in download
    count = self.engine.download_bar_data(symbol, exchange, interval, start)
  File "d:\program files\vnstudio\lib\site-packages\vnpy_datamanager\engine.py", line 216, in download_bar_data
    self.database.save_bar_data(data)
  File "d:\program files\vnstudio\lib\site-packages\vnpy_sqlite\sqlite_database.py", line 159, in save_bar_data
    DbBarData.insert_many(c).on_conflict_replace().execute()
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 1911, in inner
    return method(self, database, *args, **kwargs)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 1982, in execute
    return self._execute(database)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 2761, in _execute
    return super(Insert, self)._execute(database)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 2479, in _execute
    cursor = database.execute(self)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 3173, in execute
    return self.execute_sql(sql, params, commit=commit)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 3167, in execute_sql
    self.commit()
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 2933, in __exit__
    reraise(new_type, new_type(exc_value, *exc_args), traceback)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 191, in reraise
    raise value.with_traceback(tb)
  File "d:\program files\vnstudio\lib\site-packages\peewee.py", line 3160, in execute_sql
    cursor.execute(sql, params or ())
peewee.OperationalError: table dbbardata has no column named turnover

description
数据服务初始化成功,下载失败触发异常

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

尝试下载csv文件,按导入要求编辑表头,亦报错。

description

Traceback (most recent call last):
  File "d:\program files\vnstudio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 240, in import_data
    datetime_format
  File "d:\program files\vnstudio\lib\site-packages\vnpy_datamanager\engine.py", line 61, in import_data_from_csv
    dt = datetime.strptime(item[datetime_head], datetime_format)
  File "d:\program files\vnstudio\lib\_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "d:\program files\vnstudio\lib\_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data '2021-12-30 09:30' does not match format '%Y-%m-%d %H:%M:%S'

尝试修改匹配日期格式,删除:%S
description

Traceback (most recent call last):
  File "d:\program files\vnstudio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 240, in import_data
    datetime_format
  File "d:\program files\vnstudio\lib\site-packages\vnpy_datamanager\engine.py", line 75, in import_data_from_csv
    open_price=float(item[open_head]),
ValueError: could not convert string to float:

已尝试在excel中将csv刷成文本格式,但是csv格式文件本身不带格式,此方法亦无果。

description

Member
avatar
加入于:
帖子: 716
声望: 63

sqlite数据库在2.5版本后添加了turnover, 删除用户名目录下.vntrader中的database.db文件。重新启动vnpy即可,如果sqlite中有重要数据,请先备份数据。

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

郭易燔 wrote:

sqlite数据库在2.5版本后添加了turnover, 删除用户名目录下.vntrader中的database.db文件。重新启动vnpy即可,如果sqlite中有重要数据,请先备份数据。

已解决,感谢~

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

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】