# SSL Error while writing to InfluxDB 2.7.6 using Python3

**URL:** <https://community.influxdata.com/t/ssl-error-while-writing-to-influxdb-2-7-6-using-python3/34502>\
**Category:** Systems\
**Created:** [June 7, 2024, 6:57pm UTC](https://community.influxdata.com/t/ssl-error-while-writing-to-influxdb-2-7-6-using-python3/34502 "2024-06-07T18:57:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmanojv](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@vmanojv](https://community.influxdata.com/u/vmanojv)\
**Post date:** [June 7, 2024, 6:57pm UTC](https://community.influxdata.com/t/ssl-error-while-writing-to-influxdb-2-7-6-using-python3/34502/1 "2024-06-07T18:57:07Z")

</div>

I am using InfluxDBClient to write metrices to influxDB 2.7.6 using https.

# Initialize the InfluxDB client

```
client = InfluxDBClient(url=influxdb_url, token=influxdb_token, org=influxdb_org, ssl_ca_cert=ca_cert_path)

# Initialize the write API
write_api = client.write_api(write_options=SYNCHRONOUS)

```

However i am getting below exception:

influxdb\_client.rest.ApiException: (0)  
Reason: SSLError  
[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:897)

From the same host i am able to curl to influx https endpoint.

Log shows below error:  
msg=“http: TLS handshake error from :26724: local error: tls: bad record MAC” log\_id=0pdgWPrl000 service=http

Any clue will be helpful.

Thank You  
Manoj
