vn.py官网
开源量化社区
Member
加入于:
帖子: 40
声望: 0

Traceback (most recent call last):
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/vnpy/app/data_recorder/ui/widget.py", line 155, in process_exception_event
raise exc_info[1].with_traceback(exc_info[2])
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/vnpy/app/data_recorder/engine.py", line 80, in run
database_manager.save_tick_data(data)
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/vnpy/database/influxdb/influxdb_database.py", line 166, in save_tick_data
self.client.write_points(json_body, batch_size=10000)
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/influxdb/client.py", line 600, in write_points
consistency=consistency)
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/influxdb/client.py", line 685, in _write_points
protocol=protocol
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/influxdb/client.py", line 419, in write
headers=headers
File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/influxdb/client.py", line 378, in request
raise InfluxDBClientError(err_msg, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"partial write: field type conflict: input field \"ask_price_1\" on measurement \"tick_data\" is type integer, already exists as type float dropped=1"}

报错如上,请教哪里好改一下吗?

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

不是开始后马上报错,而是写入了几条数据后才弹出报错,后台写入也同时停止了

Member
avatar
加入于:
帖子: 470
声望: 20

请检查一下ask_price的数据类型

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

几个数据库都试了一下,就influx出现这个问题,目前接口应该不支持influx2.0是吗?
另外想请教一下,如果要进行长时间的全市场行情录制,几百个contracts保存全部tick信息的话,哪种数据库要好一些?

Member
avatar
加入于:
帖子: 2357
声望: 148

不支持。
可以考虑clickhouse

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

谢谢,我的意思是在现有的influx mongo postgresql mysql里,如果要选一个哪个更好一些,对数据量可以限制,硬件配置也不太高

Member
avatar
加入于:
帖子: 2357
声望: 148

influxdb

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

谢谢,有支持influxdb 2.0的计划吗?

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

沪公网安备 31011502017034号