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

Mats Wichmann mats at wichmann.us
Tue Apr 26 14:11:28 EDT 2022


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...
> 
>                 [2/2518] Defer to SCons to build build\__cpp_path.txt
> 
>                 [3/2518] Defer to SCons to build
>                 build\__exe_cpp_path.txt
> 
>                 [4/2518] Defer to SCons to build
>                 build\__link_objects.txt
> 
>                 [5/2518] Defer to SCons to build
>                 build\__define_options.txtscons: *** [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.




More information about the Scons-users mailing list