Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using BlenderGPT with a proxy #38

Open
tangqz opened this issue Mar 31, 2023 · 2 comments
Open

Error when using BlenderGPT with a proxy #38

tangqz opened this issue Mar 31, 2023 · 2 comments

Comments

@tangqz
Copy link

tangqz commented Mar 31, 2023

Hello,

I am using the BlenderGPT plugin and encountered an error when trying to use it with a proxy. Here is the error message:

Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connectionpool.py", line 994, in _prepare_proxy
    conn.connect()
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connection.py", line 364, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connection.py", line 501, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\ssl.py", line 1070, in _create
    self.do_handshake()
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\requests\adapters.py", line 440, in send
    resp = conn.urlopen(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 516, in request_raw
    result = _thread_context.session.request(
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\requests\sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\requests\sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\__init__.py", line 174, in execute
    blender_code = generate_blender_code(context.scene.gpt4_chat_input, context.scene.gpt4_chat_history, context, system_prompt)
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\utilities.py", line 51, in generate_blender_code
    response = openai.ChatCompletion.create(
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\lib\openai\api_resources\chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\lib\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 216, in request
    result = self.request_raw(
  File "C:\Users\qizhi\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 528, in request_raw
    raise error.APIConnectionError(
openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))


Is there a way to use BlenderGPT with a proxy? Any help would be appreciated.

Thank you.

@geshu
Copy link

geshu commented Apr 3, 2023

i meet this problem too, is there anyone can help us?

1 similar comment
@wangruibobobo
Copy link

i meet this problem too, is there anyone can help us?

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

No branches or pull requests

3 participants