链接:https ://github.com/influxdata/influxdb-python/blob/master/examples/tutorial_server_data.py
- 这可能是一个初学者的问题。
我试图复制该示例,但是当我在终端中运行时,我收到了以下消息:
终端:
python3 tutorial_server_data.py
python3 tutorial_server_data.py --host 'localhost' --port 8086 --nb_day 15
...
Create database: tutorial
Create a retention policy
Write points #: 4320
Traceback (most recent call last):
File "tutorial_server_data.py", line 93, in <module>
main(host=args.host, port=args.port, nb_day=args.nb_day)
File "tutorial_server_data.py", line 63, in main
client.write_points(series, retention_policy=retention_policy)
File "/home/joaoguilherme/.local/lib/python3.5/site-packages/influxdb/client.py", line 530, in write_points
consistency=consistency)
File "/home/joaoguilherme/.local/lib/python3.5/site-packages/influxdb/client.py", line 598, in _write_points
protocol=protocol
File "/home/joaoguilherme/.local/lib/python3.5/site-packages/influxdb/client.py", line 343, in write
headers=headers
File "/home/joaoguilherme/.local/lib/python3.5/site-packages/influxdb/client.py", line 302, in request
raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"partial write: points beyond retention policy dropped=4320"}