-
Notifications
You must be signed in to change notification settings - Fork 291
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
Bug in pipenv v2022.4.21 is preventing generation of requirements.txt from Pipfiles #694
Comments
thanks for the great summary, we are using github actions and ran across this same issue. As a temporary workaround, we added a step to generate the requirements.txt file with
and then disabled the pipenv integration with
|
Pipenv admin has confirmed the fix is included in pipenv |
I personally just preinstalled the latest version of pipenv (2022.5.2) before I use the serverless-python-requirements plugin and now it works. |
same here |
pipenv: 2022.5.2 works great!! ⚡️🚀🤘😃 |
Thanks for this thread. I am using CircleCI on an older project, python 3.8.6 image with default installed pipenv 2020.11.05. Not an option right now to update the python version, so I had to:
in the build step - run:
name: Install Python dependencies
command: |
pipenv install --dev --ignore-pipfile to - run:
name: Install Python dependencies
command: |
sudo pip uninstall -y pipenv
pip install pipenv
pipenv sync --dev and the deploy step - run:
name: Deploy to staging
command: |
# ... aws configure steps
pipenv run sls deploy --stage staging to: - run:
name: Deploy to staging preview
command: |
sudo pip uninstall -y pipenv
pip install pipenv
pipenv requirements > requirements.txt
. /home/circleci/repo/.venv/bin/activate; echo "COMPLETED" # `pipenv shell` would hang because CI didn't see any return code
# ... aws configure steps
sls deploy --stage staging |
This issue is caused by a bug in a dependency, not by serverless-python-requirements. However it took quite a bit of digging to track down this issue, so maybe this will help others facing the same issue.
There is a recent bug in pipenv that will cause this plugin to fail if the following conditions are met:
An error was introduced into pipenv by this PR pypa/pipenv#5069 which causes
pipenv lock --requirements
to write a deprecation warning message to stdout, which then gets written to the requirements.txt file.The unintentionally injected text looks like this, and it makes the generated requirements.txt file unparseable.
As a result serverless deploy terminates like this:
Running the failing command in isolation confirms the issue,
pip install
is failing because of the spurious lines in the requirements.txt file.The issue has been addressed in pipenv with this PR pypa/pipenv#5091 so the problem should be resolved when it gets released.
The text was updated successfully, but these errors were encountered: