gpt4 book ai didi

python - Firefox:编译错误 "' ascii' 编解码器无法编码字符”

转载 作者:行者123 更新时间:2023-12-01 05:32:18 25 4
gpt4 key购买 nike


我尝试编译 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 64 位。我的更改基于 Firefox 25 Source。我只更改了设计内容,没有更改代码。

最佳答案

有问题的代码本质上只是将一些内容记录到标准输出。看来你的标准输出(终端?)不是 utf-8 或类似的 python 已知编码。尝试设置您的 locale 一些合理的东西,最好是 utf-8。

您可以检查 python 将使用的标准输出编码,例如执行python -c "import sys; print sys.stdout.encoding"

关于python - Firefox:编译错误 "' ascii' 编解码器无法编码字符”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19935989/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com