cjolowicz / cookiecutter-hypermodern-python

Hypermodern Python Cookiecutter
http://cookiecutter-hypermodern-python.readthedocs.io/
MIT License
1.81k stars 235 forks source link

Github Action ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.github/workflows/constraints.txt' #1383

Open man-chi opened 6 months ago

man-chi commented 6 months ago

thanks for the great open-source project. I have set up all my tokens for pypi, testpypi, and my personal GitHub token in the project repo setting.

the codebases is purely created by cookie-cutter template, nothing has changed, however, after push to github, the github action failed at the step of "Install Poetry"

ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.github/workflows/constraints.txt'

I have checked that constraints.txt indeed exists, I have attempted in the last few weeks without success. please kindly help.

Screen Shot 2024-04-20 at 11 41 05 PM
gadams999 commented 6 months ago

Similar issue here. Appears to be pipx related, see this issue.

gadams999 commented 6 months ago

To follow up, a workaround until pipx sorts itself out is to update the pipx install or pipx inject commands as follows:

pipx install --pip-args=--constraint=${{ github.workspace }}/.github/workflows/constraints.txt nox

The ${{ github.workspace }}/. will provide the absolute path for the particular runner (ubuntu, macOS, Windows).