[Scons-users] UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3 in position 3242: illegal multibyte sequence

Daniel Moody dmoody256 at gmail.com
Tue Apr 26 14:33:08 EDT 2022


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 <mats at wichmann.us> wrote:

> On 4/26/22 06:10, liruncong2018 via Scons-users wrote:
> >         Hi,
> >
> >         The following log appears when compiling with ninja, is there a
> >         problem with the encoding process?(ninja\__init__.py)
> >
> >         ···
> >
> >                 [1/2518] Starting scons daemon... [2K
> >
> >                 [2/2518] Defer to SCons to build build\__cpp_path.txt [2K
> >
> >                 [3/2518] Defer to SCons to build
> >                 build\__exe_cpp_path.txt [2K
> >
> >                 [4/2518] Defer to SCons to build
> >                 build\__link_objects.txt [2K
> >
> >                 [5/2518] Defer to SCons to build
> >                 build\__define_options.txt [2Kscons: *** [build.ninja]
> >                 UnicodeDecodeError : 'gbk' codec can't decode byte 0xa3
> >                 in position 3299: illegal multibyte sequence
> >
> >                 Traceback (most recent call last):
> >
> >                   File
> >
>  "D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Action.py", line
> >                 1295, in execute
> >
> >                     result = self.execfunction(target=target,
> >                 source=rsources, env=env)
> >
> >                   File
> >
>  "D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Tool\ninja\__init__.py",
> >                 line 112, in ninja_builder
> >
> >                     for output in execute_ninja():
> >
> >                   File
> >
>  "D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Tool\ninja\__init__.py",
> >                 line 104, in execute_ninja
> >
> >                     for stdout_line in iter(proc.stdout.readline, ""):
> >
> >                 UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3
> >                 in position 3299: illegal multibyte sequence
> >
>
> 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
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220426/950c26e2/attachment-0001.htm>


More information about the Scons-users mailing list