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

Python Client append fields error #239

Closed
ayaghini opened this issue Apr 29, 2021 · 2 comments
Closed

Python Client append fields error #239

ayaghini opened this issue Apr 29, 2021 · 2 comments
Labels
question Further information is requested wontfix This will not be worked on
Milestone

Comments

@ayaghini
Copy link

I am trying to write to influxDB, using python the following information:

`point = (
Point("myMeasuremnt")
.tag("device", "myDevice)
.field("data", [a flatten() array of 270 x,y,z points)
.time(datetime.utcnow(), WritePrecision.NS)
)

self.write_api.write(bucket=bucket, record=point)`

and getting following error:
File "C:\Python37\lib\site-packages\influxdb_client\client\write\point.py", line 168, in _append_fields
raise ValueError()
builtins.ValueError:

the extended version of the error:

--- ---
File "C:\Python37\lib\site-packages\twisted\internet\base.py", line 913, in runUntilCurrent
call.func(*call.args, **call.kw)
File "c:\XXX\influxdb_logger.py", line 49, in _write_to_db
self.write_api.write(bucket=self.bucket, record=point)
File "C:\Python37\lib\site-packages\influxdb_client\client\write_api.py", line 243, in write
self._serialize(record, write_precision, payloads, **kwargs)
File "C:\Python37\lib\site-packages\influxdb_client\client\write_api.py", line 290, in _serialize
self._serialize(record.to_line_protocol(), record.write_precision, payload, **kwargs)
File "C:\Python37\lib\site-packages\influxdb_client\client\write\point.py", line 115, in to_line_protocol
_fields = _append_fields(self._fields)
File "C:\Python37\lib\site-packages\influxdb_client\client\write\point.py", line 168, in _append_fields
raise ValueError()
builtins.ValueError:

Apologies if this is not relevant, but I did google and could not find any answer to this issues.

Thanks for your help.

@ayaghini ayaghini changed the title site-packages\influxdb_client\client\write\point.py", line 168, in _append_fields raise ValueError() builtins.ValueError: Python Client append fields error Apr 29, 2021
@bednar
Copy link
Contributor

bednar commented Apr 30, 2021

Hi @ayaghini,

the error is caused by unsupported type of field that you want to append to Point.

This expression: .field("data", [a flatten() array of 270 x,y,z points) seems to be invalid.

Regards

@bednar bednar added the question Further information is requested label May 13, 2021
@bednar
Copy link
Contributor

bednar commented Jun 2, 2021

This issue has been closed because it has not had recent activity. Please reopen if this issue is still important to you and you have additionally information.

@bednar bednar closed this as completed Jun 2, 2021
@bednar bednar added this to the 1.18.0 milestone Jun 2, 2021
@bednar bednar added the wontfix This will not be worked on label Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants