[OpenAI]ChatGPT uses key to connect and TLS/SSL connection has been closed (EOF) (_ssl.c:1131)

The answer to this article refers to the answer on the Internet:
Zhihu: lchatgpt failed to connect when calling the api interface.

But his question is "The connection attempt failed because the connecting party did not reply correctly after a period of time or the connected host did not respond", and my question is "Python requests.exception TLS/SSL connection has been closed (EOF) (_ssl .c:1131)"

The solution is the same, downgrade the urllib3 version in the environment to 1.25.11

conda list

I found that my own urlib3 is version 2.X, so I downgraded it directly and executed the following instructions to overwrite it.

pip install urllib3==1.25.11

After downgrading, the problem is solved

Guess you like

Origin blog.csdn.net/Bartender_VA11/article/details/132125406