添加一个浮点整数到 InfluxData.Net 作为字段抛出异常假设它是一个整数
Adding a float whole number into InfluxData.Net as field throws exception assuming it is an integer
我正在使用 <package id="InfluxData.Net" version="8.0.1" targetFramework="net462" />
在此Issue据说
all numbers are now floats unless explicitly declared integers during writes (with a trailing i #3526). Closing as no longer relevant.
但是当我添加一个带有键 FloatValue
和值的字段时 - 不带小数位的浮点数会抛出异常
System.AggregateException: 'One or more errors occurred. (InfluxData API responded with status code=BadRequest, response={"error":"partial write: field type conflict: input field \"FloatValue\" on measurement \"forests\" is type integer, already exists as type float dropped=4"}
)'
这是一个打印屏幕:
有解决添加问题的解决方案吗?
问题是我接收到浮点数 作为对象 并立即将其分配给点,尽管字段值需要一个对象,我需要先将其转换为浮点数。
我正在使用 <package id="InfluxData.Net" version="8.0.1" targetFramework="net462" />
在此Issue据说
all numbers are now floats unless explicitly declared integers during writes (with a trailing i #3526). Closing as no longer relevant.
但是当我添加一个带有键 FloatValue
和值的字段时 - 不带小数位的浮点数会抛出异常
System.AggregateException: 'One or more errors occurred. (InfluxData API responded with status code=BadRequest, response={"error":"partial write: field type conflict: input field \"FloatValue\" on measurement \"forests\" is type integer, already exists as type float dropped=4"} )'
这是一个打印屏幕:
有解决添加问题的解决方案吗?
问题是我接收到浮点数 作为对象 并立即将其分配给点,尽管字段值需要一个对象,我需要先将其转换为浮点数。