Error in deploy Django/app in Heroku?

Asked

Viewed 501 times

1

I need your help to try to find the error in my deploy, which I am trying to do in Heroku.

Follow information from bash:

(python3) user@Inspiron-5548:~/opt/anaconda3/envs/python3/Projetos/ecommerce$ heroku logs
(python3) user@Inspiron-5548:~/opt/anaconda3/envs/python3/Projetos/ecommerce$ heroku keys:add ~/.ssh/id_rsa.pub
Uploading /home/user/.ssh/id_rsa.pub SSH key... done
(python3) user@Inspiron-5548:~/opt/anaconda3/envs/python3/Projetos/ecommerce$ git push heroku master
Counting objects: 53, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (53/53), 46.43 KiB | 0 bytes/s, done.
Total 53 (delta 9), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing Python-3.6.1
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        /app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51/bin/steps/pip-install: line 7: /app/.heroku/python/bin/pip: No such file or directory
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: ! Push rejected to primeirodjango.
remote: 
To https://git.heroku.com/primeirodjango.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/primeirodjango.git'

Follows information:

Requirements.txt

dj-database-url==0.4.2
Django==1.11.4
gunicorn==19.7.1
psycopg2==2.7.3

Runtime.txt

python-3.6.1  

Procfile

web: python manage.py runserver 0.0.0.0:$PORT 

Obs:

  1. First time using Heroku, but I did my homework and the communication is all configured according to repository documentation.

  2. Within our project, we choose to use the Anaconda because it is a complete python package. To start the project I made an envs inside the Anaconda 3, but she was over a pound in size. As I had not been able to do the "deploy" at first, I believed to have been the size, so I shortened the file "Reskirts.txt" for essential libs.

  • 1

    Take a look here https://devcenter.heroku.com/articles/django-app-configuration. Heroku suggests using gunicorn as webserver for Django. Try to change your procfile using this webserver. One more useful link

  • Thank you @flaviomeira10, I will check now.

2 answers

1


  • That reply https://stackoverflow.com/a/44034968/362438 in the English OS also refers to the Python version. Apparently, the one Vic.py is trying is no longer supported at all and the error is quite misleading.

0

In your repository you must have changes that are not yet on the machine which probably leads to this error tries to force the push in this way:

git push -f heroku master

Browser other questions tagged

You are not signed in. Login or sign up in order to post.