platformio / platform-native

Native: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/native
Apache License 2.0
21 stars 28 forks source link

UnicodeDecodeError on Windows 10 Native project #6

Closed anikinmd closed 2 years ago

anikinmd commented 3 years ago

Hi I tried to build a Native project but ran into errors with the builder system.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in position 0: invalid continuation byte: File "C:\Users\anikin_md\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 170: env.SConscript("$BUILD_SCRIPT") File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 598: return _SConscript(self.fs, *files, **subst_kw) File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 287: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "C:\Users\anikin_md\.platformio\platforms\native\builder\main.py", line 33: env.Tool("gcc") File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 1844: tool(self) File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Tool\__init__.py", line 269: self.generate(env, *args, **kw) File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Tool\gcc.py", line 59: version = detect_version(env, env['CC']) File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Tool\gcc.py", line 94: while SCons.Util.to_str(pipe.stdout.readline()): File "C:\Users\anikin_md\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Util.py", line 1602: return str(s, 'utf-8')

My system: Windows 10 x64 Python 3.8.5 (If PIO uses already installed python) VSCode 1.52.0 PIO Core 5.0.3

Other platforms (AVR/STM32/Nordic) work great.

ivankravets commented 2 years ago

Could you reproduce this issue with the latest PIO Core 6.0? pio upgrade --dev

brunolnetto commented 2 years ago

Solution: install linux and VS Code. Problem solved.

anikinmd commented 2 years ago

@ivankravets, Since the issue was opened almost a year ago my environment changed a lot. Now I can’t even reproduce this by myself on upstream platformio core.

ivankravets commented 2 years ago

Yes, seems like issue has been fixed. Happy coding with PlatformIO 🚀