"UnicodeDecodeError: 'charmap' codec can't decode byte 0x98" when compiling project on my PC

Since last month I cant compile my project code in PlatformIO (Windows 10, Visual Studio Code), every time I try to do it so, I get this error message:


It was working fine before, I didn’t make any changes to the code.

Things I tried to fix this error:

  • Moving to PlatformoIO version 2.0.0 beta5 from 1.10.0 - no change
  • Downgrading to earlier PlatformoIO versions - no change
  • Uninstalling all pythons from my PC and reinstalling PlatformoIO - no change
  • Moving project directory to different location - no change
  • Installing Visual Studio Code with PlatformoIO in fresh Windows 10 virtual machine and compiling my project here - it works!

Since my code compile in virtual machine it looks like it is some PlotformIO build-in python problem that for some reason occurs only on my PC, but I have no idea why.