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

Trouble with Poetry Operations for a Project Dependent on FastAPI-Cache (commit # 8f0920d , dependency redis) #417

Open
SudeshnaBora opened this issue Mar 22, 2024 · 0 comments

Comments

@SudeshnaBora
Copy link

I'm working on a project and have specified a dependency in the pyproject.toml file as follows:

[tool.poetry.dependencies]
fastapi-cache2 = {extras = ["redis"], git = "https://github.com/long2ice/fastapi-cache.git", rev = "8f0920d"}

When I run poetry install, it completes successfully. However, attempting to run poetry lock, poetry add "fastapi-cache2[redis]@git+https://github.com/long2ice/fastapi-cache.git#8f0920d", or poetry update <any-other-dependency> results in failures. The error message indicates a CalledProcessError, mentioning that a subprocess command returned a non-zero exit status:

CalledProcessError
  Command '['/path/to/.venv/bin/python', '-']' returned non-zero exit status 1.
  at /path/to/python3.11/subprocess.py:569 in run

Further details from the error suggest an EnvCommandError, indicating an issue with executing a command in the environment:

EnvCommandError
  Command ['/path/to/.venv/bin/python', '-'] errored with the following return code 1
  Output:
  Traceback (most recent call last):
    ...
    raise BuildException(f'Source {srcdir} does not appear to be a Python project: no pyproject.toml or setup.py')
  build.BuildException: Source /path/to/cache/pypoetry/virtualenvs/project-py3.11/src/fastapi-cache does not appear to be a Python project: no pyproject.toml or setup.py

I attempted to replicate this in a fresh poetry project using the poetry add "fastapi-cache2[redis]@git+https://github.com/long2ice/fastapi-cache.git#8f0920d" command, but encountered a different issue:

Failed to clone https://github.com/long2ice/fastapi-cache.git at '8f0920d', verify ref exists on remote.

I've confirmed that the specific commit 8f0920d indeed contains a pyproject.toml file.

Cloning the project and checking out this commit works fine outside of Poetry, which suggests there may be a bug within Poetry or the way it interacts with this specific git dependency.

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

1 participant