Incorrect executable path (platformio.exe)

I’m hitting the “Path to shell executable … does not exist” bug.

The path that it’s looking in has changed, but it’s still wrong. It seems to be looking in the source code directory (this project is called masthead and it’s checked out in the source folder):

 *  Executing task: c:\Users\me\source\masthead\platformio.exe run 


 *  The terminal process failed to launch: Path to shell executable "c:\Users\me\source\masthead\platformio.exe" does not exist. 

That’s strange. How did you install platformio?

Ususally platformio.exe resides in C:\Users\<username>\.platformio\penv\Scripts !?

Please check if that path even exists.

Hi,

This all worked last week - which makes it even harder to understand.

I deleted .platformio from users dir, code and .pio dirs from source and AppData (basically resetting VSCode in the process). Opened the project and the popup for the recommended extension suggested PlatformIO, I accepted that and let it install. I even checked out the code in a different location and retried the same. Each time it’s looking for the executable in the source directory.

I have even added the exe to my windows PATH

The exe exists in the correct place.

 ~/.platformio/penv/Scripts
$ ls
Activate.ps1  async-json-rpc-server.exe  pio.exe          pip3.exe               python.exe    uvicorn.exe
__pycache__   bottle.py                  piodebuggdb.exe  platformio.exe         pythonw.exe
activate      deactivate.bat             pip.exe          pyserial-miniterm.exe  readelf.py
activate.bat  normalizer.exe             pip3.11.exe      pyserial-ports.exe     tabulate.exe

Did you set some other (Windows) environment variables like PLATFORMIO_CORE_DIR ?

No - I only set that one (and removed it after when it had no effect - even after restarts etc)

Where does PlatformIO store the path to the executable? It’s got to be picking it up from somewhere. If I can find that config file I can remove the bad entry.

PlatformIO works on this project on another PC - it’s just ‘this’ one that doesn’t work. That implies the path isn’t in the project git repo files.

Unfortunately, I don’t know.

cc @ivankravets : Do you know where this crazy path “c:\Users\me\source\masthead\platformio.exe” comes from and how to fix this issue?

So we don’t appear to have made progress on this bug. It’s struck again, latest project and all was fine until today then

 *  The terminal process failed to launch: Path to shell executable "c:\Users\butlerg\Dropbox\code\MorningStar\platformio.exe" does not exist. 

Check this one:

1 Like

This also “infects” other projects. Once the bug hits one of them, then they all start to fail for the same reason.

The PATH fix does seem to work. Lets hope the developers work out the proper bug fix soon.