# Getting error with openai 1.3.5 python openai api connection error

**URL:** <https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090>\
**Category:** API\
**Created:** [November 28, 2023, 9:04am UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090 "2023-11-28T09:04:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lalithanjalivaddadi](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@lalithanjalivaddadi](https://community.openai.com/u/lalithanjalivaddadi)\
**Post date:** [November 28, 2023, 9:04am UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090/1 "2023-11-28T09:04:45Z")

</div>

raise to\_exc(exc) from exc

httpcore. ConnectError: [SSL: WRONG\_VERSION NUMBER] wrong version number (\_ssl.c:1006)

raise APIConnectionError(request-request) from err

openai.APIConnectionError: Connection error.

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [November 28, 2023, 11:09am UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090/2 "2023-11-28T11:09:44Z")

</div>

Hi and welcome to the Developer Forum!

What version of python are you using?, I’m running 3.8 without any problems.

---

<div class="post-metadata">

**Author:** ![lalithanjalivaddadi](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@lalithanjalivaddadi](https://community.openai.com/u/lalithanjalivaddadi)\
**Post date:** [November 28, 2023, 12:26pm UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090/3 "2023-11-28T12:26:57Z")

</div>

Hi  
I am using python version 3.11

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [November 28, 2023, 12:48pm UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090/4 "2023-11-28T12:48:58Z")

</div>

In that case, it’s going to be 1 of a couple of possibilities, one is your urllib3 version which you can downgrade to 1.23 and give that a try `pip3 install urllib3==1.23`, or you may be using a proxy of some sort and not actually specifying it as in this reply

![image](https://us1.discourse-cdn.com/openai1/original/4X/a/8/b/a8b1838aaf25e632db1938f60a5c474026b1f5fc.png)

---

<div class="post-metadata">

**Author:** ![lalithanjalivaddadi](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@lalithanjalivaddadi](https://community.openai.com/u/lalithanjalivaddadi)\
**Post date:** [November 29, 2023, 5:00am UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090/5 "2023-11-29T05:00:15Z")

</div>

I have used pip3 install urllib3==1.23 with python version 11  
Now i am getting this error  
File “D: \Llama Workspace\LlamaIndex\_POC. venv\Lib\site-packages \httpx\_transports \default.py”, 1i raise mapped\_exc (message) from exc

httUnsupportedProtocol: Request URL is missing an http://’ or •https://• protocol.  
File “D: ALlama Workspace LLlamaIndex POCI. venv\Lib\site-packages \openai base \_client py”, line 9 Traise APIConnectionError (request-request) from err

openai.APIConnectionError: Connection error.

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [November 29, 2023, 5:09am UTC](https://community.openai.com/t/getting-error-with-openai-1-3-5-python-openai-api-connection-error/531090/6 "2023-11-29T05:09:17Z")

</div>

It sounds like you might need to review your environment `path` variable, and have it pointing to the correct install directory for OS python with no others.

system properties → advanced → environment variables → system

 ![image](https://us1.discourse-cdn.com/openai1/original/4X/a/b/a/aba3c183f8f3f97482837bc5816ccb9e635dcb28.png)

While there, an OPENAI\_API\_KEY would be good to add…

You should not type “pip3”, but instead “pip”. That also could be searching alternate paths to find different pythons.
