1
我是新來的燒瓶和Heroku的,所以要嘗試一下,我寫了一個小程序,當我運行它在本地使用foreman start
工作正常。然而,當我嘗試git push heroku master
,我得到以下錯誤:Heroku的推拒絕 - 無法編譯 - Unicode的錯誤
----------------------------------------
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上提出的類似問題的建議解決方案,但我仍然遇到同樣的錯誤。任何幫助將不勝感激。提前致謝!
如果我還沒有提供上述足夠的信息來回答這個問題,只是讓我知道你需要知道什麼,我會很樂意提供它。 – 2014-10-10 19:35:50
看起來這實際上是Pip中的一個錯誤。 [即真實示數的線(https://github.com/pypa/pip/blob/master/pip/basecommand.py#L161)試圖加入一堆一起使用STR(「\ n」)日誌行,首先需要將所有這些日誌行轉換爲strs。默認情況下,它會嘗試執行ascii編碼,但某些日誌行包含一個不帶ascii表示的字符。不幸的是,我不知道如何找出產生這個unicode日誌行的東西。 – 2014-10-10 19:48:44
@AdamK我有完全一樣的錯誤:(,任何消息? – Ricardo 2014-11-09 20:17:25