【发布时间】:2017-11-13 21:10:26
【问题描述】:
我正在尝试在 influx db 中插入一些字符串值,但不断收到 400 错误。我正在使用 python 请求模块连接到 influxdb。这是我的代码:
description = '"' + some_str + '"'
payload = "%s, name=%s, description=%s, count=%d %d" %(measurement, name, description,count,timestamp)
requests.post(influx_uri, data=payload, headers= headers)
我不断收到此错误:
400 {"error":"unable to parse 'sample,name=sample, description=\"some_str\", count=1 15106068120000000' : missing tag key"}
我不知道这是如何生成的 description=\"some_str\"
【问题讨论】:
-
这对您有帮助吗:github.com/influxdata/influxdb/issues/3600?不是直接的答案,而是类似的。
-
我已经检查过了,如果我去掉描述字段,它会很好地找到。无论如何谢谢@Grzegorg
-
sample是度量,相当于关系数据库中的表
标签: python python-requests influxdb