![](/img/trans.png)
[英]How can i solve a migration issue in django project hosted on heroku?
[英]I can not register my Django project on Heroku
我今天将python版本从3.6.4更新到了3.6.5。 这是因为在分发到Heroku的过程中,建议使用版本3.6.5。 因此,确认了以下动力壳内容物。
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后,现在出现以下错误:
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所说的不是默认版本吗?
你是我的好帮手。 谢谢大家!
Heroku认为您的runtime.txt
包含一些额外的字符:
ÿþpython-3.6.5
对于以little-endian顺序编码为UTF-16的文件,这可能是字节顺序标记 。 确保您对该文件(和其他文件)使用了合理的编码。 在几乎所有情况下,UTF-8都是不错的选择。
您正在尝试安装ÿþpython-3.6.5
而不是python-3.6.5
如控制台输出所示。 删除ÿþ
,它应该可以正常工作。
不是这个! 太荒谬了! 我只是删除了runtime.txt文件 ... Heroku已经很好地部署了我的Django项目。 当然会有应用程序错误,但是...谢谢! 每个人都告诉我一些有用的信息。 顺便说一句,我仍然不知道为什么它能正常部署。 是否有理由删除runtime.txt文件?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.