This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Writting NaN values makes the Client to fail #195
Closed
Description
Writting a NaN
value makes the Client to fail. Only tested with influxdb08
with the DataFrameClient
import pandas as pd
from influxdb.influxdb08 import DataFrameClient
data = pd.DataFrame({
'value':[1.5,float('Nan'),3.2]},
index=pd.date_range('01-01-2015', periods=3, freq='D'))
client = DataFrameClient(host, port, user, password, dbname)
client.write_points({'test':data})
raises the error
<class \'influxdb.influxdb08.client.InfluxDBClientError\'> : 400: b"invalid character \'N\' looking for beginning of value"
The client tries to write the value NaN
which is not a valid JSON value. Python NaN
should be mapped to JSON null
. This is coherent with the Pandas usage to encode missing data by NaN
Metadata
Metadata
Assignees
Labels
No labels