Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous integer return values break InfluxDB type inference #6

Open
Gadgetoid opened this issue Feb 18, 2022 · 0 comments
Open

Erroneous integer return values break InfluxDB type inference #6

Gadgetoid opened this issue Feb 18, 2022 · 0 comments

Comments

@Gadgetoid
Copy link
Member

Currently rain and other values are set to integer 0 on startup and later changed to a calculated float value. This breaks InfluxDB since it infers an integer type from the first datapoint and subsequent floats fail with "field type conflict":

Traceback (most recent call last):
  File "send-to-influx.py", line 101, in <module>
    client.write_points(payload)
  File "/home/pi/.local/lib/python3.7/site-packages/influxdb/client.py", line 608, in write_points
    consistency=consistency)
  File "/home/pi/.local/lib/python3.7/site-packages/influxdb/client.py", line 685, in _write_points
    protocol=protocol
  File "/home/pi/.local/lib/python3.7/site-packages/influxdb/client.py", line 419, in write
    headers=headers
  File "/home/pi/.local/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 \"rain\" on measurement \"weather\" is type float, already exists as type integer dropped=1"}
Gadgetoid added a commit that referenced this issue Feb 18, 2022
Gadgetoid added a commit that referenced this issue Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant