# Bug in Python client setup code

**URL:** <https://community.influxdata.com/t/bug-in-python-client-setup-code/34840>\
**Category:** Systems\
**Tags:** influxdb\
**Created:** [July 5, 2024, 10:32am UTC](https://community.influxdata.com/t/bug-in-python-client-setup-code/34840 "2024-07-05T10:32:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moritz-Steinle](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/moritz-steinle/32/15909_2.png) [@Moritz-Steinle](https://community.influxdata.com/u/Moritz-Steinle)\
**Post date:** [July 5, 2024, 10:32am UTC](https://community.influxdata.com/t/bug-in-python-client-setup-code/34840/1 "2024-07-05T10:32:13Z")

</div>

The Influx WebUI offers code snippets to connect the DB to a Python client (“Setting Up Python”)

The suggested code in step 5 “Write Data” in line 3 is

```auto
write_api = client.write_api(write_options=SYNCHRONOUS)

```

but should be

```auto
write_api = write_client.write_api(write_options=SYNCHRONOUS)

```

---

<div class="post-metadata">

**Author:** ![suyash](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/suyash/32/15791_2.png) [@suyash](https://community.influxdata.com/u/suyash)\
**Post date:** [July 8, 2024, 6:17pm UTC](https://community.influxdata.com/t/bug-in-python-client-setup-code/34840/2 "2024-07-08T18:17:25Z")

</div>

Thanks for catching this, let me look and file an issue to get it fixed.
