[英]Firefox: compile error “'ascii' codec can't encode character”
我嘗試編譯Firefox,因為我做了一些更改。 但是,當我嘗試編譯這些東西時,出現此錯誤:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 530, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 483, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/ternes3/Downloads/mozilla-release/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 698, in _processOutput
self.processOutputLine(line.rstrip())
File "/home/ternes3/Downloads/mozilla-release/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 663, in processOutputLine
handler(line)
File "/home/ternes3/Downloads/mozilla-release/python/mach/mach/mixin/process.py", line 86, in handleLine
line_handler(line)
File "/home/ternes3/Downloads/mozilla-release/python/mozbuild/mozbuild/mach_commands.py", line 242, in on_line
self.log(logging.INFO, 'build_output', {'line': line}, '{line}')
File "/home/ternes3/Downloads/mozilla-release/python/mach/mach/mixin/logging.py", line 54, in log
extra={'action': action, 'params': params})
File "/usr/local/lib/python2.7/logging/__init__.py", line 1191, in log
self._log(level, msg, args, **kwargs)
File "/usr/local/lib/python2.7/logging/__init__.py", line 1246, in _log
self.handle(record)
File "/usr/local/lib/python2.7/logging/__init__.py", line 1256, in handle
self.callHandlers(record)
File "/usr/local/lib/python2.7/logging/__init__.py", line 1293, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python2.7/logging/__init__.py", line 740, in handle
self.emit(record)
File "/home/ternes3/Downloads/mozilla-release/python/mozbuild/mozbuild/mach_commands.py", line 75, in emit
self.fh.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xbb' in position 98: ordinal not in range(128)
我的構建系統是ArchLinux 64bit。 我的更改基於Firefox 25源。 我只更改設計的東西,沒有代碼。
嘗試在腳本開始時添加以下內容:
import sys
sys.setdefaultencoding("utf-8")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.