为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

largeQ 2021-10-26 10:48:29
我正在尝试将我的应用程序推送到 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 detectedremote: /app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/bin/steps/python: line 5: warning: command substitution: ignored null byte in inputremote: ) is not available for this stack (heroku-18).remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-supportremote:  !     Push rejected, failed to compile Python app.remote:remote:  !     Push failedremote: 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.0Django==2.1.5django-bootstrap4==0.0.7django-ckeditor==5.6.1django-heroku==0.3.1django-js-asset==1.1.0django-suit-redactor==0.0.4django-summernote==0.8.11.4gunicorn==19.9.0Pillow==5.4.1psycopg2==2.7.7pytz==2018.9whitenoise==4.1.2
查看完整描述

2 回答

?
波斯汪

TA贡献1811条经验 获得超4个赞

必须将 runtime.txt 更改为 3.6.7 而不是 3.6.5


查看完整回答
反对 回复 2021-10-26
  • 2 回答
  • 0 关注
  • 214 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号