Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

[Bug]: requests.exceptions.SSLError #996

Closed
1 task done
jianhai0527 opened this issue Mar 3, 2023 · 2 comments
Closed
1 task done

[Bug]: requests.exceptions.SSLError #996

jianhai0527 opened this issue Mar 3, 2023 · 2 comments

Comments

@jianhai0527
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

requests.exceptions.SSLError

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

requests.exceptions.SSLError

Version where the problem happens

3.0.5

What Python version are you running this with?

3.10.9

What is your operating system ?

No response

Command Line Arguments

from revChatGPT.V1 import Chatbot
chatbot = Chatbot(config={
            "email": email,
            "password": password,
            "proxy": "socks5://127.0.0.1:13659"
        })

Console logs

requests.exceptions.SSLError: SOCKSHTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/csrf (Caused by SSLError(CertificateError("hostname 'explorer.api.openai.com' doesn't match either of '*.facebook.com', '*.facebook.net', '*.fbcdn.net', '*.fbsbx.com', '*.m.facebook.com', '*.messenger.com', '*.xx.fbcdn.net', '*.xy.fbcdn.net', '*.xz.fbcdn.net', 'facebook.com', 'messenger.com'")))

Additional information

No response

@acheong08
Copy link
Owner

OpenAI got blocked in China completely. Use VPN or proxy

Duplicate of #987

@acheong08 acheong08 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2023
@hongyi-zhao
Copy link

hongyi-zhao commented Mar 3, 2023

@acheong08

OpenAI got blocked in China completely. Use VPN or proxy

The OP has already used the proxy in him/her config, as stated below:

Command Line Arguments

from revChatGPT.V1 import Chatbot
chatbot = Chatbot(config={
            "email": email,
            "password": password,
            "proxy": "socks5://127.0.0.1:13659"
        })

I also performed the similar testing, but no error occurred:

Console logs

requests.exceptions.SSLError: SOCKSHTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/csrf (Caused by SSLError(CertificateError("hostname 'explorer.api.openai.com' doesn't match either of '*.facebook.com', '*.facebook.net', '*.fbcdn.net', '*.fbsbx.com', '*.m.facebook.com', '*.messenger.com', '*.xx.fbcdn.net', '*.xy.fbcdn.net', '*.xz.fbcdn.net', 'facebook.com', 'messenger.com'")))

Please compare with my following testing results:

In [1]: from revChatGPT.V1 import Chatbot

In [2]: chatbot = Chatbot(config={
   ...:             "access_token": "<access_token>",
   ...:             "proxy": "socks5h://127.0.0.1:18890"
   ...:         })

In [3]: print("Chatbot: ")
   ...: prev_text = ""
   ...: for data in chatbot.ask(
   ...:     "Hello world",
   ...: ):
   ...:     message = data["message"][len(prev_text) :]
   ...:     print(message, end="", flush=True)
   ...:     prev_text = data["message"]
   ...: print()
Chatbot: 
Hello! How can I assist you today?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants