# SSL error(\[X509\] PEM lib) while using OpenAI

**URL:** <https://community.openai.com/t/ssl-error-x509-pem-lib-while-using-openai/64664>\
**Category:** API\
**Created:** [February 17, 2023, 8:45am UTC](https://community.openai.com/t/ssl-error-x509-pem-lib-while-using-openai/64664 "2023-02-17T08:45:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubhemma](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@shubhemma](https://community.openai.com/u/shubhemma)\
**Post date:** [February 17, 2023, 8:45am UTC](https://community.openai.com/t/ssl-error-x509-pem-lib-while-using-openai/64664/1 "2023-02-17T08:45:24Z")

</div>

While I’m using the openai.Completion.create method, I’m getting this error:

Error communicating with OpenAI: HTTPSConnectionPool(host=‘[api.openai.com](http://api.openai.com/)’, port=443): Max retries exceeded with url: /v1/engines/text-davinci-002/completions (Caused by SSLError(SSLError(9, ‘[X509] PEM lib (\_ssl.c:4265)’)))

I have tried all the possible solutions like:

Updating the operating system’s root certificates.  
using a different SSL verification method. set the VERIFY parameter to False when making the HTTPS request.

What should I do to solve this?

---

<div class="post-metadata">

**Author:** ![curt.kennedy](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/curt.kennedy/32/709249_2.png) [@curt.kennedy](https://community.openai.com/u/curt.kennedy)\
**Post date:** [February 4, 2024, 6:58pm UTC](https://community.openai.com/t/ssl-error-x509-pem-lib-while-using-openai/64664/2 "2024-02-04T18:58:37Z")

</div>

Closed on February 4, 2024, 6:58pm UTC


