Build Fails after most recent Updates

Using VS Code on WIndows 10 System with PlatformIO IDE for single project use (Tasmota). Been working great for over a year now and I keep VS Code and Extensions updated regularly. After last weeks updates, I now get the following error when trying to Build my project:

The terminal process failed to launch: Path to shell executable “d:\Tasmota-8.4.0 Release GEORGE\platformio.exe” does not exist.

I have checked my Path environment and all is still intact. I have uninstalled VS Code and deleted all the various config files, then reinstalled. Same error. Searched on the net, but cannot locate a solution. Greatly appreciate help. Also, when I click on “Update all” I get the following message:

‘platformio’ is not recognized as an internal or external command,
operable program or batch file.

That is a really unusual path for the platformio.exe to be stored in. Did you modify PLATFORMIO_CORE_DIR to achieve this knowingly? Is the platformio.exe really there at this path?

Also have you tried a reboot? Some changes to the PATH may eventually only be seen after reboot.

Also note that PIO Core 5 (to which you were probably updated to) has some breaking changes with regards to PIO 4, so the latest version of the Tasmota repository should be used too.

d:\Tasmota-8.4.0 Release GEORGE\ is the path to my project folder and there is not nor ever has been a “platform.exe” file in my project folders.

Yes, have tried reboot, uninstall, reinstall, etc.

Thanks for the info on the PIO Core’s. I will read up on that.

Have a 2nd Windows 10 machine and just allowed VS Code to install all updates. My Tasmota project compiles just fine on that machine, so I guess my VS Code installation/configuration on my main machine is corrupt. Not sure how to repair.

I’d suggest a clean uninstall and reinstall of PlatformIO.

  • Remove the PIO extension from VSCode
  • If you installed PIO via the CLI (pip3 install platformio), do a pip3 uninstall platformio.
  • Go into your homer folder (C:\Users\<user>\) and remove the entire .platformio folder
  • Open a terminal (Windows + R → cmd.exe) and type where pio
    • if that returns a valid path, there’s a duplicate installation of PIO there. Delelte the folder structure in which that executable is in. Also remove it from the PATH if it was added to the PATH.
    • if Windows says “Information: could not find a file matching the given specification”, all is good
  • Install the PIO extension in VSCode
  • Create a new simple project (on the C: drive), e.g. for a Uno with framework Arduino and the blinky code. Does that compile? If not, report back error
  • if above goes through, try compiling Tasmota (cloned on the C: drive)
  • if that goes through, retry on the D: drive

Note that some antivirus solutions interfere with the installation and usage process, so you might want to temporarily disable them.

Followed your suggestion and get exact same error on simple project as my other project:

The terminal process failed to launch: Path to shell executable “c:\new project path\platformio.exe” does not exist

Also, when I open VS Code and click on PlatformIO and then Update All, I get this error:

platformio : The term ‘platformio’ is not recognized as the name of a cmdlet,
function, script file, or operable program.

My VS Code and/or PlatformIO configuration is corrupt on my machine. Uninstall and reinstall does not fix the problem as it seems there is some other “config” file that is not getting removed when I uninstall it.

Thanks for helping me on this.

Hi,

I am facing the same problem unfortunately. Did you find the solution to this?
I am currently on version 2.2.1, but rolled back to version 2.0.0 and same problem. I’ve also tried uninstalling and reinstalling platformio from within VS code (with and without deleting the .platformio folder where it was installed to by VS Code), clearing the .pio and .vscode folders from my project folder, and reinstalling VS Code…

Pressing “Build” results in:

Executing task: c:\Users\Ollie\Documents\Code\onitronics-code-mmx\pio.exe run --environment zeroUSB <

The terminal process failed to launch: Path to shell executable “c:\Users\Ollie\Documents\Code\onitronics-code-mmx\pio.exe” does not exist.

Terminal will be reused by tasks, press any key to close it.

If I open a terminal from platformio via “Miscellaneous → New Terminal”, then try to run pio, it is unrecognized. My vague understanding was that this terminal should already have activated the platformio virtual environment, giving me access to pio etc. ?

I tried quickly to add PLATFORMIO_CORE_DIR as an environment variable on my system, pointing to C:\Users\Ollie.platformio (where VS Code) installed platformio, but that didn’t change anything.

Similarly, adding:
core_dir=%HOMEPATH%.platformio
to the platformio.ini file a the base of my project directory did nothing.

Thanks

I got around this by adding the location of pio.exe to my path, which in my case is

C:\Users\Ollie.platformio\penv\Scripts

… however I don’t remember doing this manually before (I’ve been using platformio successfully for maybe >1 year).

PlatformIO things the pio.exe core executable is inside your project folder… did you re-initialize your project? (project tasks → Miscellaneous → Rebuild IntelliSense)