Welcome to the community.
Which InfluxDB version do you have installed? I guess you have installed InfluxDBv2 but you are using the client library for version 1.x.x ?
InfluxDBv2 python client:
GitHub - influxdata/influxdb-client-python: InfluxDB 2.0 python client
InfluxDBv1 python client:
GitHub - influxdata/influxdb-python: Python client for InfluxDB