我无法在Heroku上注册我的Django项目 [英] I can not register my Django project on Heroku

查看:134
本文介绍了我无法在Heroku上注册我的Django项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天将python版本从3.6.4更新到了3.6.5.这是因为,在分发到Heroku的过程中,建议使用3.6.5版.因此,确认了以下电源外壳的内容.

I updated the python version from 3.6.4 to 3.6.5 today. This is because, in the process of distributing to Heroku, it recommends version 3.6.5. Therefore, the following power shell contents were confirmed.

Writing objects: 100% (35/35), 11.68 KiB | 0 bytes/s, done.
Total 35 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: -----> Python app detected
remote:  !     The latest version of Python 3 is python-3.6.5 (you are using ÿþpython-3.6.5, which is unsupported).
remote:  !     We recommend upgrading by specifying the latest version (python-3.6.5).
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing ÿþpython-3.6.5
remote:  !     Requested runtime (ÿþpython-3.6.5) is not available for this stack (heroku-16).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote:
remote: !       Push rejected to XXXXXXXX.
remote:
To https://git.heroku.com/XXXXXXXX.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/XXXXXXXX.git

将我的runtime.txt文件更改为UTF-8后,现在出现以下错误:

After changing my runtime.txt file to UTF-8, I now get the following error:

Writing objects: 100% (35/35), 11.68 KiB | 0 bytes/s, done.
Total 35 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: -----> Python app detected
remote:  !     The latest version of Python 3 is python-3.6.5 (you are using python-3.6.5, which is unsupported).
remote:  !     We recommend upgrading by specifying the latest version (python-3.6.5).
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.6.5
remote:  !     Requested runtime (python-3.6.5) is not available for this stack (heroku-16).
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 XXXXXXXX.
remote:
To https://git.heroku.com/XXXXXXXX.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/XXXXXXXX.git

为什么python-3.6.5被拒绝?这不是Heroku所说的是默认版本吗?

Why is python-3.6.5 being rejected? Isn't that exactly what Heroku says is the default version?

你是我的好帮手.谢谢大家!

You were my good helper. Thank you, everybody!

推荐答案

Heroku认为您的runtime.txt包含一些额外的字符:

Heroku believes that your runtime.txt contains some extra characters:

ÿþpython-3.6.5

对于用小写编码为UTF-16的文件,这可能是字节顺序标记-endian顺序.确保您对该文件(和其他文件)使用了合理的编码.在几乎所有情况下,UTF-8都是不错的选择.

This is probably byte-order mark for a file encoded as UTF-16 in little-endian order. Make sure you're using a sane encoding for that file (and others). UTF-8 is a good choice in virtually all situations.

这篇关于我无法在Heroku上注册我的Django项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆