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 generating code. Please contact support. #416

Open
LiuJiaoShouYa opened this issue Oct 24, 2024 · 1 comment
Open

Error generating code. Please contact support. #416

LiuJiaoShouYa opened this issue Oct 24, 2024 · 1 comment

Comments

@LiuJiaoShouYa
Copy link

Incoming websocket connection...
INFO: connection open
Received params
Using openAiApiKey from client-side settings dialog
Using official OpenAI URL
Generating html_css code in image mode using Llm.CLAUDE_3_5_SONNET_2024_06_20...
Status (variant 0): Generating code...
Status (variant 1): Generating code...
Error generating code. Please contact support.
Traceback (most recent call last):
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 66, in map_httpcore_exceptions
yield
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection_pool.py", line 216, in handle_async_request
raise exc from None
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection_pool.py", line 196, in handle_async_request
response = await connection.handle_async_request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection.py", line 99, in handle_async_request
raise exc
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection.py", line 76, in handle_async_request
stream = await self._connect(request)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection.py", line 122, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_backends\auto.py", line 30, in connect_tcp
return await self._backend.connect_tcp(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_backends\anyio.py", line 112, in connect_tcp
with map_exceptions(exc_map):
File "C:\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: All connection attempts failed

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

Traceback (most recent call last):
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1470, in _request
response = await self._client.send(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1617, in send
response = await self._send_handling_auth(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 365, in handle_async_request
with map_httpcore_exceptions():
File "C:\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 83, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed

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

Traceback (most recent call last):
File "C:\pyfile\screenshot-to-code\backend\llm.py", line 62, in stream_openai_response
stream = await client.chat.completions.create(**params) # type: ignore
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai\resources\chat\completions.py", line 1334, in create
return await self._post(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1738, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1441, in request
return await self._request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1494, in _request
return await self._retry_request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1563, in _retry_request
return await self._request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1494, in _request
return await self._retry_request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1563, in _retry_request
return await self._request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1504, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Traceback (most recent call last):
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 66, in map_httpcore_exceptions
yield
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection_pool.py", line 216, in handle_async_request
raise exc from None
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection_pool.py", line 196, in handle_async_request
response = await connection.handle_async_request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection.py", line 99, in handle_async_request
raise exc
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection.py", line 76, in handle_async_request
stream = await self._connect(request)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_async\connection.py", line 122, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_backends\auto.py", line 30, in connect_tcp
return await self._backend.connect_tcp(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_backends\anyio.py", line 112, in connect_tcp
with map_exceptions(exc_map):
File "C:\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: All connection attempts failed

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

Traceback (most recent call last):
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1470, in _request
response = await self._client.send(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1617, in send
response = await self._send_handling_auth(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 365, in handle_async_request
with map_httpcore_exceptions():
File "C:\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\httpx_transports\default.py", line 83, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed

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

Traceback (most recent call last):
File "C:\pyfile\screenshot-to-code\backend\llm.py", line 62, in stream_openai_response
stream = await client.chat.completions.create(**params) # type: ignore
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai\resources\chat\completions.py", line 1334, in create
return await self._post(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1738, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1441, in request
return await self._request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1494, in _request
return await self._retry_request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1563, in _retry_request
return await self._request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1494, in _request
return await self._retry_request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1563, in _retry_request
return await self._request(
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\openai_base_client.py", line 1504, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\fastapi\applications.py", line 276, in call
await super().call(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\middleware\errors.py", line 149, in call
await self.app(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\middleware\cors.py", line 75, in call
await self.app(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call
raise e
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\routing.py", line 718, in call
await route.handle(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "C:\Virtualenvs\screenshot-to-code\lib\site-packages\fastapi\routing.py", line 289, in app
await dependant.call(**values)
File "C:\pyfile\screenshot-to-code\backend\routes\generate_code.py", line 331, in stream_code
raise Exception("All generations failed")
Exception: All generations failed
INFO: connection closed

@abi
Copy link
Owner

abi commented Oct 24, 2024

httpx.ConnectError: All connection attempts failed

Is the OpenAI API accessible to you?

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

2 participants