The error message should tell you in which file it occurred, e.g. above buildroot\share\PlatformIO\scripts\STM32F103RC_SKR_MINI.py”, line 6
.
See also Unable to build Marlin code for SKR Mini E3 v1.2 STM32F103RC_btt - #5 by zz-jaybuck-zz and Trying to compile Marlin 2.1.2 for Ender 3 SKR Mini v2.0 board - #9 by maxgerhardt.