You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either that the data is accepted, or that I get a clear error message that a field keys with a single backslash followed by space is unsupported by Influx. I particularly expect that I get an exception from to_line_protocol rather than that it returns something that is invalid according to Influx and that Influx rejects with "invalid field format".
This problem also arises if giving the point object directly to write rather than going via to_line_protocol, this approach just makes it clear that it can return an invalid line protocol string.
Actual behavior
influxdb_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.6', 'X-Platform-Error-Code': 'invalid', 'Date': 'Wed, 26 Jun 2024 13:28:23 GMT', 'Content-Length': '152'})
HTTP response body: {"code":"invalid","message":"unable to parse 'test-measurement-1,test-tag-key-X=test-tag-value-X this\\ doesnt\\ \\\\ work=666i': invalid field format"}
If I remove either the slash followed by space or the space, it works.
Additional info
AFAIK Influx doesn't support field keys that have a single backslash followed by a space? I intend to replace backslash-space with double-backslash-space on my end for backwards compatibility either way, but this tripped up four people at work when they upgraded and something that used to work (albeit by subtly turning a single into a double backslash) instead blew up with an exception.
influxdb-client 1.19.0 doesn't report an error and the values end up in the database, but it ends up with double backslashes for fields and tags.
The text was updated successfully, but these errors were encountered:
Specifications
Code sample to reproduce problem
Expected behavior
Either that the data is accepted, or that I get a clear error message that a field keys with a single backslash followed by space is unsupported by Influx. I particularly expect that I get an exception from
to_line_protocol
rather than that it returns something that is invalid according to Influx and that Influx rejects with "invalid field format".This problem also arises if giving the point object directly to
write
rather than going viato_line_protocol
, this approach just makes it clear that it can return an invalid line protocol string.Actual behavior
If I remove either the slash followed by space or the space, it works.
Additional info
AFAIK Influx doesn't support field keys that have a single backslash followed by a space? I intend to replace backslash-space with double-backslash-space on my end for backwards compatibility either way, but this tripped up four people at work when they upgraded and something that used to work (albeit by subtly turning a single into a double backslash) instead blew up with an exception.
influxdb-client 1.19.0 doesn't report an error and the values end up in the database, but it ends up with double backslashes for fields and tags.
The text was updated successfully, but these errors were encountered: