influxdata / influxdb-client-python

InfluxDB 2.0 python client
https://influxdb-client.readthedocs.io/en/stable/
MIT License
706 stars 185 forks source link

warnings returned when using example program on https://influxdb-client.readthedocs.io/en/latest/ #633

Closed schaefer01 closed 1 month ago

schaefer01 commented 7 months ago

Specifications

Code sample to reproduce problem

see https://influxdb-client.readthedocs.io/en/latest/ at "Getting Started"

Expected behavior

I expected no warnings

Actual behavior

/home/ubuntu/radioconda/lib/python3.10/site-packages/influxdb_client/client/flux_csv_parser.py:334: UserWarning: The response contains columns with duplicated names: '['', 'result', 'table', '_start', '_stop', '_time', '_value', '_field', '_measurement', 'org', 'result']'.

You should use the 'record.row' to access your data instead of 'record.values' dictionary.

warnings.warn(message, UserWarning) The response contains columns with duplicated names: '['', 'result', 'table', '_start', '_stop', '_time', '_value', '_field', '_measurement', 'org', 'result']'.

You should use the 'record.row' to access your data instead of 'record.values' dictionary

Additional info

No response

bednar commented 1 month ago

Hi @schaefer01,

Thank you for bringing this to our attention. Based on your description, it sounds like the warning you're encountering is specific to the profile query example provided in our documentation.

In this instance, since the warning is confined to an example scenario and does not impact actual functionality or performance, my recommendation would be to ignore it.

However, if you find that this warning is appearing in other contexts or affecting your usage of the client, please let us know so we can investigate further.

Regards.