简体   繁体   中英

Heroku push rejected - failed to compile - Unicode error

I'm new to Flask and Heroku, so to try it out, I wrote a little app that works fine when I run it locally using foreman start . However, when I try to git push heroku master , I get the following error:

----------------------------------------
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

I don't really understand the error traceback here in terms of what exactly is going wrong. Is it something with scipy, or with the html templates I've made, or one of the modules? I've tried out the proposed solutions to similar questions that others have asked on stackoverflow, but I still get the same error. Any help would be greatly appreciated. Thanks in advance!

Try replacing the line distribute==xxx with setuptools>=0.7 on your requirements.txt file

Works for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM