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. #467

Open
pagnkelly opened this issue Dec 25, 2024 · 1 comment
Open

Error generating code. Please contact support. #467

pagnkelly opened this issue Dec 25, 2024 · 1 comment

Comments

@pagnkelly
Copy link

Error generating code. Please contact support.
Traceback (most recent call last):
File "/Users/didi/code/github.com/abi/screenshot-to-code/backend/llm.py", line 40, in stream_openai_response
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/openai/_client.py", line 357, in init
super().init(
~~~~~~~~~~~~~~~~^
version=version,
^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
_strict_response_validation=_strict_response_validation,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/openai/_base_client.py", line 1443, in init
self._client = http_client or AsyncHttpxClientWrapper(
~~~~~~~~~~~~~~~~~~~~~~~^
base_url=base_url,
^^^^^^^^^^^^^^^^^^
...<4 lines>...
**kwargs, # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/openai/_base_client.py", line 1337, in init
super().init(**kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py", line 1411, in init
else self._init_proxy_transport(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
proxy,
^^^^^^
...<5 lines>...
trust_env=trust_env,
^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py", line 1464, in _init_proxy_transport
return AsyncHTTPTransport(
verify=verify,
...<4 lines>...
proxy=proxy,
)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_transports/default.py", line 309, in init
raise ImportError(
...<2 lines>...
) from None
ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using pip install httpx[socks].
Traceback (most recent call last):
File "/Users/didi/code/github.com/abi/screenshot-to-code/backend/llm.py", line 40, in stream_openai_response
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/openai/_client.py", line 357, in init
super().init(
~~~~~~~~~~~~~~~~^
version=version,
^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
_strict_response_validation=_strict_response_validation,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/openai/_base_client.py", line 1443, in init
self._client = http_client or AsyncHttpxClientWrapper(
~~~~~~~~~~~~~~~~~~~~~~~^
base_url=base_url,
^^^^^^^^^^^^^^^^^^
...<4 lines>...
**kwargs, # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/openai/_base_client.py", line 1337, in init
super().init(**kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py", line 1411, in init
else self._init_proxy_transport(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
proxy,
^^^^^^
...<5 lines>...
trust_env=trust_env,
^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py", line 1464, in _init_proxy_transport
return AsyncHTTPTransport(
verify=verify,
...<4 lines>...
proxy=proxy,
)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_transports/default.py", line 309, in init
raise ImportError(
...<2 lines>...
) from None
ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using pip install httpx[socks].
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/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 "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/middleware/errors.py", line 152, in call
await self.app(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/middleware/cors.py", line 77, in call
await self.app(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 362, in handle
await self.app(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 95, in app
await wrap_app_handling_exceptions(app, session)(scope, receive, send)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 93, in app
await func(session)
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/fastapi/routing.py", line 383, in app
await dependant.call(**solved_result.values)
File "/Users/didi/code/github.com/abi/screenshot-to-code/backend/routes/generate_code.py", line 335, in stream_code
raise Exception("All generations failed")
Exception: All generations failed
INFO: connection closed
Task exception was never retrieved
future: <Task finished name='Task-11' coro=<AsyncClient.aclose() done, defined at /Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py:1967> exception=AttributeError("'AsyncHttpxClientWrapper' object has no attribute '_mounts'")>
Traceback (most recent call last):
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py", line 1975, in aclose
for proxy in self._mounts.values():
^^^^^^^^^^^^
AttributeError: 'AsyncHttpxClientWrapper' object has no attribute '_mounts'
Task exception was never retrieved
future: <Task finished name='Task-12' coro=<AsyncClient.aclose() done, defined at /Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py:1967> exception=AttributeError("'AsyncHttpxClientWrapper' object has no attribute '_mounts'")>
Traceback (most recent call last):
File "/Users/didi/Library/Caches/pypoetry/virtualenvs/backend-3aP43wfi-py3.13/lib/python3.13/site-packages/httpx/_client.py", line 1975, in aclose
for proxy in self._mounts.values():
^^^^^^^^^^^^
AttributeError: 'AsyncHttpxClientWrapper' object has no attribute '_mounts'

@abi
Copy link
Owner

abi commented Dec 25, 2024

Have you tried ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using pip install httpx[socks].

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