PlatformIO Community

Invalid decimal Literal in

Hey I am using STM32F401CC with a stlink and I get this error when I try to upload code

platform = ststm32
board = genericSTM32F401CC
framework = stm32cube
debug_tool = stlink
upload_protocol = stlink

On the CLI, what does pio system info output? Is it using your system-wide python3 install or, as is recommended, a local python environment? Issues like these say it’s an incompatibility with the used Python version.

An especial smoking gun is that ~/.local/lib/python3.10 should not show up in the stacktrace as a used python package if PlatformIO was installed via installer script – it should only use its own packages in ~/.platformio.

I got this output

Previously I used the install script after that all the pip installs were going to ~/.platformio/package directory, I thought that was weird so I removed that and just did pip install platformio

Can you tell me what the install script does to the global python environment.

No that’s exactly what the installer script is supposed to do – create a Python environment isolated from your system’s python environment.

I see two possibilities: To run PlatformIO from your system’s python, update the uuid library so that it can be properly imported (pip3 install --upgrade uuid I guess), or remove the global PlatformIO installation again (pip remove platformio) and install it via the docs, then add it do your PATH.