influxdata / docs-v2

InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux.
https://docs.influxdata.com
MIT License
69 stars 258 forks source link

Typo in Python setting up directions #5501

Open DennisCor opened 1 week ago

DennisCor commented 1 week ago

Hi Team Influx,

I have just installed InfluxDB (v2.7.6) on my Raspberry and set up Python using "Get Started" via the browser (.../new-user-setup/python)

I find the type of step-by-step instructions with the code displayed very advanced, thank you for that. However, I noticed an error:

Under the item "Initialize Client" you initialize the client as "write_client ":

write_client = influxdb_client.InfluxDBClient(url=url, token=token, org=org)

But in the next step at "Write Data" you call it with "client":

write_api = client.write_api(write_options=SYNCHRONOUS)

I Think it should be insteded:

write_api = write_client.write_api(write_options=SYNCHRONOUS)

I hope I'm not wrong and this tip helps.

Kind Regards,

Dennis Cording

jstirnaman commented 1 week ago

You're correct--thanks for reporting this! You might also be interested in our IoT starter tutorial for Python: https://docs.influxdata.com/influxdb/v2/api-guide/tutorials/python/