ModuleNotFoundError: No module named 'chardet'

Hello. My PlatformIO and VSCode setup was working just fine, but out of nowhere this error started popping up when building:

ModuleNotFoundError: No module named 'chardet'

This might be important as well:
fatal: not a git repository (or any of the parent directories): .git CMake Error at path/.platformio/packages/framework-espidf/tools/cmake/build.cmake:452 (message):

Any idea why that could be happening? I did not change anything.

Looks like running manual pio run helped to resolve the issue. Any idea why was that?