将 django 应用程序部署到 heroku 时出错

我正在尝试将我的应用程序推送到 heroku,但出现以下错误:


Counting objects: 1907, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (1894/1894), done.

Writing objects: 100% (1907/1907), 9.86 MiB | 2.10 MiB/s, done.

Total 1907 (delta 160), reused 0 (delta 0)

remote: Compressing source files... done.

remote: Building source:

remote:

remote: -----> Python app detected

remote: /app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb4152

7f360ebd2e3bef7b8917bda7b51cf284cfdb/bin/steps/python: line 5: warning: command substitution: ignored null byte in input


remote: ) is not available for this stack (heroku-18).

remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support

remote:  !     Push rejected, failed to compile Python app.

remote:

remote:  !     Push failed

remote: Verifying deploy...

remote:

remote: !       Push rejected to mywebsite.

remote:

To https://git.heroku.com/mywebsite.git

 ! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to 'https://git.heroku.com/mywebsite.git'

有任何想法吗?我有 Procfile、requirements.txt 和 runtime.txt 文件


简介:


web: gunicorn myapp.wsgi --log-file -

运行时.txt:


python-3.6.5

要求.txt:


dj-database-url==0.5.0

Django==2.1.5

django-bootstrap4==0.0.7

django-ckeditor==5.6.1

django-heroku==0.3.1

django-js-asset==1.1.0

django-suit-redactor==0.0.4

django-summernote==0.8.11.4

gunicorn==19.9.0

Pillow==5.4.1

psycopg2==2.7.7

pytz==2018.9

whitenoise==4.1.2


largeQ
浏览 215回答 2
2回答

波斯汪

必须将 runtime.txt 更改为 3.6.7 而不是 3.6.5
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python