screenshot-to-code
screenshot-to-code copied to clipboard
encountering problem running poetry shell
Where are you calling poetry jnstall? In which dir?
https://github.com/python-poetry/poetry-plugin-shell https://github.com/python-poetry/poetry/issues/507
Thanks for replying!!
Solved problem reference to issues above.
but I got new problem I don't know if it's something wrong with the api key
ERROR: Exception in ASGI application Traceback (most recent call last): File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-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/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-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/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/applications.py", line 112, in call await self.middleware_stack(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/middleware/errors.py", line 152, in call await self.app(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/middleware/cors.py", line 77, in call await self.app(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-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/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 715, in call await self.middleware_stack(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 362, in handle await self.app(scope, receive, send) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-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/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/starlette/routing.py", line 93, in app await func(session) File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/fastapi/routing.py", line 383, in app await dependant.call(**solved_result.values) File "/Volumes/mini/mini/screenshot-to-code/backend/routes/generate_code.py", line 242, in stream_code await stream_claude_response_native( ...<6 lines>... ) File "/Volumes/mini/mini/screenshot-to-code/backend/llm.py", line 202, in stream_claude_response_native async with client.messages.stream( ~~~~~~~~~~~~~~~~~~~~~~^ model=model.value, ^^^^^^^^^^^^^^^^^^ ...<3 lines>... messages=messages_to_send, # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) as stream: ^ File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/anthropic/lib/streaming/_messages.py", line 305, in aenter raw_stream = await self.__api_request ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/anthropic/_base_client.py", line 1838, in post return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/anthropic/_base_client.py", line 1532, in request return await self._request( ^^^^^^^^^^^^^^^^^^^^ ...<5 lines>... ) ^ File "/Users/shaosakurai/Library/Caches/pypoetry/virtualenvs/backend-2RGbgXKO-py3.13/lib/python3.13/site-packages/anthropic/_base_client.py", line 1633, in _request raise self._make_status_error_from_response(err.response) from None anthropic.PermissionDeniedError: Error code: 403 - {'error': {'type': 'forbidden', 'message': 'Request not allowed'}} INFO: connection closed
does this log mean my api config is usable? but the code generated is empty
I think something's up with my Anthropic key: "anthropic.PermissionDeniedError: Error code: 403 - {'error': {'type': 'forbidden', 'message': 'Request not allowed'}}"
The logs on the backend only indicate that the resizing we do for the Anthropic API is working correctly.
by the way, where can I change Anthropic base url
I think something's up with my Anthropic key: "anthropic.PermissionDeniedError: Error code: 403 - {'error': {'type': 'forbidden', 'message': 'Request not allowed'}}"
The logs on the backend only indicate that the resizing we do for the Anthropic API is working correctly.
get it
Hello, I have the same issue after running poetry install.
Any ideas how to fix it or what the issue is. I tried to resolve with copilot but it was't particularly helpful.
Github copilot saying. Update your pyproject.toml file to include the packages section:
It suggest changing pyproject.toml file and add
[tool.poetry.packages] packages = [ { include = "backend", from = "backend" } ]
However this gives different error.
_The Poetry configuration is invalid:
- tool.poetry.packages must be array_
When I try to fix it. Copilot suggest to change it to an array what gives different error.
pyproject.toml is not a valid TOML file. TOMLDecodeError: Cannot declare ('tool', 'poetry') twice (at line 25, column 13)
this error doesn't matter actually, the install just work out fine. you can ignore it
Thanks for response. I've seen someone mention that it's a very strange way of poetry saying that everything is fine. However, I've also seen people sharing screenshots showing no errors and a smooth installation process. That's when I started thinking that maybe I shouldn't be ignoring it.