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

encountering problem running poetry shell #493

Open
Teyae opened this issue Feb 22, 2025 · 14 comments
Open

encountering problem running poetry shell #493

Teyae opened this issue Feb 22, 2025 · 14 comments

Comments

@Teyae
Copy link

Teyae commented Feb 22, 2025

Image
@Teyae Teyae changed the title can't run poetry install lacking package file encountering problem running poetry shell Feb 22, 2025
@Teyae
Copy link
Author

Teyae commented Feb 22, 2025

Image

@Teyae
Copy link
Author

Teyae commented Feb 22, 2025

Image

@abi
Copy link
Owner

abi commented Feb 22, 2025

Where are you calling poetry jnstall? In which dir?

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

https://github.com/python-poetry/poetry-plugin-shell
python-poetry/poetry#507

Thanks for replying!!

Solved problem reference to issues above.

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

but I got new problem I don't know if it's something wrong with the api key

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

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

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

Image

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

does this log mean my api config is usable?
but the code generated is empty

@abi
Copy link
Owner

abi commented Feb 23, 2025

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.

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

Image

by the way, where can I change Anthropic base url

@Teyae
Copy link
Author

Teyae commented Feb 23, 2025

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

@Marcelfoxion
Copy link

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.

Image

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)

@Teyae
Copy link
Author

Teyae commented Feb 24, 2025

this error doesn't matter actually, the install just work out fine. you can ignore it

@Marcelfoxion
Copy link

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.

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