My user folder has a whitespace, pio won't compile

“Error: Detected a whitespace character in project paths.”
Won’t compile

My user is “Sig Desktop” and changing username does not change the user folder in windows 10

This comes from my user folder and can’t be changed without breaking other paths
How can I fix this without needing to create a whole new user profile and not breaking other programs using the path?

This project has ESP-IDF as its framework? It’s a limitation of their CMake build system then.

1 Like

Yes… I know it’s a limitation, looking for a fix

Set core_dir to a folder without spaces and put the project in a folder without spaces. E.g., C:\MyProjects.

Where do I set “core_dir” having trouble finding it?

in the platformio.ini in the [platformio] section.

Seems like I can’t just change that without moving a lot of files and folders

Unfortunately, that seems to only work if all the (unknown which) files and folders are relocated

I’m assuming I need to move everything under the ./.platformio folder?

No need to move core things manually. After setting the core dir correctly and moving only the project directory to a space without paths, reopen the project at the new location and build again. It should install PlatformIO in the designated path.

1 Like

Another workaround is to create an empty .platformio folder in the root of the main drive (usually C:, => C:/.platformio). PlatformIO installer will automatically pick that folder and use it later for all operations.

Two more workarounds:

  • create a directory junction so that the project can be opened by two different paths;
  • it’s also possible to change the user folder path in Windows with one registry key change.