回复: UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3 in position 3242: illegal multibyte sequence

liruncong2018 via Scons-users <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
Hi,
I compiled it in one of two ways:
1) scons -j%NUMBER_OF_PROCESSORS% --experimental=ninja
2) run_ninja_env.bat







Attached are build.ninja and run_ninja_env.bat.


------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "SCons users mailing list"                                                                                    <[email protected]&gt;;
发送时间:&nbsp;2022年4月27日(星期三) 凌晨2:34
收件人:&nbsp;"SCons users mailing list"<[email protected]&gt;;

主题:&nbsp;Re: [Scons-users] UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3 in position 3242: illegal multibyte sequence



On windows you should use the run_ninja_env.bat to ensure that your environment is setup as the ninja file itself is unable to correctly setup windows cmdshells.

On Tue, Apr 26, 2022 at 1:33 PM Daniel Moody <[email protected]&gt; wrote:

As a work around you can run ninja directly. This particular issue is scons reading and reprinting the ninja subprocess stdout. I'll see if I can reproduce and get a fix.

On Tue, Apr 26, 2022 at 1:11 PM Mats Wichmann <[email protected]&gt; wrote:

On 4/26/22 06:10, liruncong2018 via Scons-users wrote:
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hi,
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The following log appears when compiling with ninja, is there a
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;problem with the encoding process?(ninja\__init__.py)
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;···
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[1/2518] Starting scons daemon... [2K
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[2/2518] Defer to SCons to build build\__cpp_path.txt [2K
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[3/2518] Defer to SCons to build
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;build\__exe_cpp_path.txt [2K
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[4/2518] Defer to SCons to build
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;build\__link_objects.txt [2K
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[5/2518] Defer to SCons to build
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;build\__define_options.txt [2Kscons: *** [build.ninja]
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UnicodeDecodeError : 'gbk' codec can't decode byte 0xa3
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in position 3299: illegal multibyte sequence
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Traceback (most recent call last):
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; File
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Action.py", line
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1295, in execute
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; result = self.execfunction(target=target,
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;source=rsources, env=env)
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; File
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Tool\ninja\__init__.py",
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;line 112, in ninja_builder
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; for output in execute_ninja():
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; File
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Tool\ninja\__init__.py",
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;line 104, in execute_ninja
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; for stdout_line in iter(proc.stdout.readline, ""):
 &gt; 
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in position 3299: illegal multibyte sequence
 &gt; 
 
 that error usually happens when the system codec isn't what we US-based
 folk expect, and we haven't specified an encoding for a file/stream when
 reading in text mode so the system codec gets used.
 
 
 _______________________________________________
 Scons-users mailing list
 [email protected]
 https://pairlist4.pair.net/mailman/listinfo/scons-users

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
ninja.rar (application/octet-stream, 98.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.