Django - Heroku - 做出改变

时间:2017-06-02 05:17:44

标签: python django git heroku

我被要求对之前由不再可用的人管理的Heroku上的Django应用程序进行一些更改。

我之前没有使用过Heroku,所以我希望这是一个非常简单的问题。

我使用heroku git:clone -a myapp

克隆了应用

我更改了base.html文件。我真的删除了几行HTML。

然后我跑了

git add .
git commit -m "Some helpful message"
git push heroku master

我得到了这个错误追溯:

Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 497 bytes | 0 bytes/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Running pre-compile hook
remote: -----> Noticed django-wkhtmltopdf, bootstrapping wkhtmltopdf.
remote: -----> No runtime.txt provided; assuming python-2.7.3.
remote: -----> Using Python runtime (python-2.7.3)
remote: -----> Noticed pylibmc. Bootstrapping libmemcached.
remote: -----> Installing dependencies using Pip (1.2.1)
remote: ERROR:root:code for hash md5 was not found.
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in <module>
remote:     globals()[__func_name] = __get_hash(__func_name)
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
remote:     raise ValueError('unsupported hash type %s' % name)
remote: ValueError: unsupported hash type md5
remote: ERROR:root:code for hash sha1 was not found.
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in <module>
remote:     globals()[__func_name] = __get_hash(__func_name)
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
remote:     raise ValueError('unsupported hash type %s' % name)
remote: ValueError: unsupported hash type sha1
remote: ERROR:root:code for hash sha224 was not found.
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in <module>
remote:     globals()[__func_name] = __get_hash(__func_name)
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
remote:     raise ValueError('unsupported hash type %s' % name)
remote: ValueError: unsupported hash type sha224
remote: ERROR:root:code for hash sha256 was not found.
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in <module>
remote:     globals()[__func_name] = __get_hash(__func_name)
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
remote:     raise ValueError('unsupported hash type %s' % name)
remote: ValueError: unsupported hash type sha256
remote: ERROR:root:code for hash sha384 was not found.
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in <module>
remote:     globals()[__func_name] = __get_hash(__func_name)
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
remote:     raise ValueError('unsupported hash type %s' % name)
remote: ValueError: unsupported hash type sha384
remote: ERROR:root:code for hash sha512 was not found.
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 139, in <module>
remote:     globals()[__func_name] = __get_hash(__func_name)
remote:   File "/app/.heroku/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
remote:     raise ValueError('unsupported hash type %s' % name)
remote: ValueError: unsupported hash type sha512
remote: Traceback (most recent call last):
remote:   File "/app/.heroku/python/bin/pip", line 9, in <module>
remote:     load_entry_point('pip==1.1', 'console_scripts', 'pip')()
remote:   File "/app/.heroku/python/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line 343, in load_entry_point
remote:     return get_distribution(dist).load_entry_point(group, name)
remote:   File "/app/.heroku/python/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line 2307, in load_entry_point
remote:     return ep.load()
remote:   File "/app/.heroku/python/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line 2013, in load
remote:     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
remote:   File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 10, in <module>
remote:     from pip.backwardcompat import walk_packages, console_to_str
remote:   File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/backwardcompat.py", line 18, in <module>
remote:     import md5 as md5_module
remote:   File "/app/.heroku/python/lib/python2.7/md5.py", line 10, in <module>
remote:     from hashlib import md5
remote: ImportError: cannot import name md5
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to app-portal.
remote: 
To https://git.heroku.com/app-portal.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app-portal.git'

我更改的唯一文件是base.html所以发生了什么?

1 个答案:

答案 0 :(得分:0)

我已经解决了这个问题。该应用程序在cedar-10上运行,Heroku已声明虽然堆栈将继续运行,但不支持或不支持应用程序更新。