86
Experienced the same problem while working on a project, in the branch you are pushing to Heroku, run
pipenv lock
and it will update the Pipfile.lock file.
7
Updating my pipenv: pip install pipenv --upgrade
then doing: pipenv lock
then do a commit
fixed this for me
- [Django]-How to create a custom decorator in Django?
- [Django]-How to save pillow image object to Django ImageField?
- [Django]-Django: Switching to Jinja2?
3
I removed the Pipfile.lock
and commited it’s deletion. Heroku’s build process complained about it not being there, but it did deploy successfully…
-----> Python app detected
! No 'Pipfile.lock' found! We recommend you commit this into your repository.
-----> Installing pip
-----> Installing dependencies with Pipenv 11.8.2…
Installing dependencies from Pipfile…
-----> Discovering process types
Procfile declares types -> worker
-----> Compressing...
Done: 189.9M
-----> Launching...
Released v5
- [Django]-Request.POST.get('sth') vs request.POST['sth'] – difference?
- [Django]-Format numbers in django templates
- [Django]-Django model CharField: max_length does not work?
3
If there is already a Pipfile created, delete it and push deploy it again. It should re-install your dependencies. That is what worked for me.
- [Django]-Django print choices value
- [Django]-Paginating the results of a Django forms POST request
- [Django]-Write only, read only fields in django rest framework
2
The simplest way to deal with this is to run :
pipenv lock
and then git commit -am "updated pipfile"
,
git push && git push heroku master
These commands do the same exact thing as some of the other commands listed in other answer but well, these might do it a bit faster.
- [Django]-How can I handle Exceptions raised by dango-social-auth?
- [Django]-How to combine multiple QuerySets in Django?
- [Django]-Creating my own context processor in django
2
I have experienced the same problem today, so I solved in the way, the guy mentioned below, by updating my pipenv – pip install pipenv --upgrade
and then hitting pipenv lock
. This is the way to go, and solves the most cases. Also, after that do not forget to git add, commit and to push to heroku! Hope that helps!
- [Django]-Bad Django / uwsgi performance
- [Django]-ImportError: Couldn't import Django
- [Django]-Embedding JSON objects in script tags
1
You should provide either a:
Pipfile
and correspondingPipfile.lock
or
requirements.txt
(and optionallyruntime.txt
)
If you are using a Pipfile
then git rm requirements.txt runtime.txt
and make sure to git add Pipfile Pipfile.lock
. git commit
and then try your git push
to heroku.
- [Django]-How to display the current year in a Django template?
- [Django]-How to disable Django's invalid HTTP_HOST error?
- [Django]-Trying to parse `request.body` from POST in Django
1
I had the same problem and it was due to a symbolic link pointing to Pipfile.lock.
After cloning the repo on my local mac OS environment, for some reasons, the original link was kind of broken and this resulted in Your Pipfile.lock (3b2ba9) is out of date. Expected: (83a5b4)
when pushing to Heroku.
Just deleting the “old” symbolic link and recreating it from my local env solved the issue.
- [Django]-Django REST Framework (DRF): Set current user id as field value
- [Django]-Remove duplicates in a Django query
- [Django]-Disable a method in a ViewSet, django-rest-framework
0
Using the Heroku CLI, I was running git push heroku master
from a local branch that was not master
, when this exact error appeared:
remote: -----> Python app detected
remote: -----> Installing pip
remote: -----> Installing dependencies with Pipenv 2018.5.18…
remote: Your Pipfile.lock (38bf21) is out of date. Expected: (e4987e).
remote: Aborting deploy.
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
Deploying from the master
branch fixed it.
If you want to push a local branch to the Heroku master that is not master
, run git push heroku branchname:master
.
- [Django]-Serializing a list of objects with django-rest-framework
- [Django]-How do I include image files in Django templates?
- [Django]-Steps to Troubleshoot "django.db.utils.ProgrammingError: permission denied for relation django_migrations"
-2
Just another tip: Make sure to do a git add .
and git commit -m "whatever"
if you’ve made updates to your Pipfile.lock
and don’t see any changes.
- [Django]-How would you create a 'manual' django migration?
- [Django]-How to limit columns returned by Django query?
- [Django]-Django: How do I add arbitrary html attributes to input fields on a form?