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
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
When writing a point where one or more field values are empty strings (""), influxdb-python will omit them in the line protocol representation. If there are no non-empty fields, this will omit all fields, resulting in an invalid line protocol format and an error.
For example, the following is allowed on the influx command line interface:
> INSERT m0 value=""
> SELECT * FROM m0
name: m0
time value
---- -----
1540946138927548393
However, the equivalent in python results in an InfluxDBClientError:
This appears to be related to the None handling introduced in commit 26683a4. In that commit, a conversion from None to '' was introduced in _get_unicode, and subsequently field values == '' are filtered out in make_lines. However, if a user explicitly passes in '' for a field value, then those values will get caught in this check and be filtered out as well.
This affects version 5.2.0 and earlier, and was tested against influxdb 1.4.3. It may also be related to #549.
The text was updated successfully, but these errors were encountered:
* Fix make_lines excludes fields with empty strings (#655)
Converting to unicode required something to be done with None values. They were
converted to empty strings which were subsequently ignored. This makes it
impossible to write an explicitly empty string, which should be possible. This
change distinguishes between None and empty strings.
* Fix linting failure due to long comment line
Co-authored-by: Greg Schrock <gschrock@128technology.com>
…nfluxdata#766)
* Fix make_lines excludes fields with empty strings (influxdata#655)
Converting to unicode required something to be done with None values. They were
converted to empty strings which were subsequently ignored. This makes it
impossible to write an explicitly empty string, which should be possible. This
change distinguishes between None and empty strings.
* Fix linting failure due to long comment line
Co-authored-by: Greg Schrock <gschrock@128technology.com>
When writing a point where one or more field values are empty strings (
""
), influxdb-python will omit them in the line protocol representation. If there are no non-empty fields, this will omit all fields, resulting in an invalid line protocol format and an error.For example, the following is allowed on the influx command line interface:
However, the equivalent in python results in an InfluxDBClientError:
This appears to be related to the
None
handling introduced in commit 26683a4. In that commit, a conversion fromNone
to''
was introduced in_get_unicode
, and subsequently field values ==''
are filtered out inmake_lines
. However, if a user explicitly passes in''
for a field value, then those values will get caught in this check and be filtered out as well.This affects version 5.2.0 and earlier, and was tested against influxdb 1.4.3. It may also be related to #549.
The text was updated successfully, but these errors were encountered: