我是Flask和Heroku的新手,所以为了尝试一下,我写了一个小应用程序,当我使用foreman start
在本地运行它时工作正常。但是,当我尝试git push heroku master
时,我收到以下错误:
----------------------------------------
Cleaning up...
Command /app/.heroku/python/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip_build_u44996/scipy/setup.py';exec(compile
(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
__file__, 'exec'))" install --record /tmp/pip-ETnOiF-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in
/tmp/pip_build_u44996/scipy
Traceback (most recent call last):
File "/app/.heroku/python/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/
__init__.py", line 185, in main
return command.main(cmd_args)
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/
basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 70:
ordinal not in range(128)
! Push rejected, failed to compile Python app
我真的不明白这里的错误追溯是什么出错了。它是scipy,还是我制作的html模板,还是其中一个模块?我已经尝试了其他人在stackoverflow上提出的类似问题的建议解决方案,但我仍然得到相同的错误。任何帮助将不胜感激。提前谢谢!
答案 0 :(得分:0)
尝试在requirements.txt文件中将setup == x.x.x替换为setuptools&gt; = 0.7
适合我。