Was following a tutorial to update the Marlin firmware on new printer I just got. Everything going fine until got to step about installing PlatformIO extension, then the Auto Build Marlin extension. I think I inflicted this on myself but end result is PlatformIO is broken and has me dead in my tracks. I get this long list of errors below but I’m inclined to think they are result of bad install rather than cause.
Also get the following. I know that PlatformIO failed to install but I’ve uninstalled VS Code a couple of times and after reading a few community questions that seems like a dead end in any case. The corrupt PlatformIO & Marlin extension settings seem to persist even after uninstalling VS Code so I’m stuck. I’m not a programmer and my experience to date has been VS Code on a Raspberry Pi.
Seems like if I could truly uninstall this extension and Marlin extension I could just start over but if I can’t uninstall, I can’t reinstall.
FWIW the Developer Tools is just a mass of red.
Debugging information is available via VSCode > Help > Toggle Developer Tools > Console. Failed to install PlatformIO IDE.
Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null at c:\Users\wsqua\.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:771390 at a (c:\Users\wsqua\.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:771284) at w (c:\Users\wsqua\.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:771035) at u (c:\Users\wsqua\.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:770559) at c:\Users\wsqua\.vscode\extensions\platformio.platformio-ide-2.3.3...Error: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received null
at a (c:\Users\wsqua.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:771284)
at w (c:\Users\wsqua.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:771035)
at u (c:\Users\wsqua.vscode\extensions\platformio.platformio-ide-2.3.3\node_modules\platformio-node-helpers\dist\index.js:1:770559)
A clean uninstall would go like this:
- uninstall AutoBuild Marlin extension from VSCode
- uninstall the PIO extension from VSCOde
rm -rf ~/.platformio (this is where the PlatformIO core and packages live)
- if you previously attempted to install PlatformIO via e.g.
pip, uninstall it. (
pip uninstall platformio,
pip3 uninstall platformio, etc.)
From there I’d suggest doing the installation per docs to pre-install the core. You will clearly see if this fails or not.
If that is successfull, installing the PlatformIO VSCode extension should go through without any problems (it detects the previously installed PlatformIO core). If not, post the error message.
I’ve just built a new Win10 laptop and have this exact issue. I see github issues are flooded with it too so it’s not unique to me/us.
- Clean Win10 laptop
- Installed VS Code (Latest, downloaded from MS Store)
- Opened VSCode, went to manage plugins and installed PlatformIO. Goes through the steps and then errors out as above.
I’ve tried deleting .platform and .code to no avail.
Sadly this seems like a compatibility issue with the latest version of Win10/PlatformIO/VSCode as this worked without a hitch on previous laptop.
Have you tried per PlatformIO errors while trying to install · Issue #2703 · platformio/platformio-vscode-ide · GitHub?
I had actually seen that. While it was not installed at first, I installed it and now python --version shows 3.9.7. Still not working.
I pulled out an older laptop, one not updated in a while and had vscode on it but no PlatformIO - I could not install it either so it looks like a Platform thing and not a VSCode thing.
Can you get the menu to install a previous version of the VSCode PIO plugin?
Try going back a few.
And we’re in business!
So, installing the older version caused VSC to prompt it does not know where Python is. Odd me thinks. Python is installed and visible in cmd python --version. I check path though and it’s not in path.
I had installed Python 3.9.7 from the MS store and it placed it in
However this was not in path. Clearly something else going on.
I removed python and downloaded it manually. An install of that and all is well!
IN SHORT: DO NOT USE PYTHON FROM MS STORE
You must download from website and install old-skool
Thanks for the prompt in the right direction!
But this Microsoft Python problem is known since ages at e.g. Failed to install PlatformIO IDE New - #2 by maxgerhardt. But if the older extension was to at least find the path then I guess there’s some regression
I was able to get it installed properly this morning.
I had done the Python 3.9 install yesterday and that did not fix.
I uninstalled and reinstalled Python again this morning.
Uninstalled/Reinstalled VSC this morning.
I went and repaired every MS module (NOT MS Appications). More like various runtimes that were showing in Add/Remove programs. (Don’t think that did anything).
I installed the PlatformIO CORE. I do think this helped.
Somewhere in among all of the above I got to wondering if maybe there was some conflict with 32 bit vs 64 bit.
I was poking around on MS VSC website and came on a file/message about some *.visx file which I installed.
I also got an error message around this time I had wrong OS version of some file (I’m not near laptop or I could give file names). Error message told me where appropriate file location was and I installed.
That may have been the .visx file.
.visx files are related to extensions some kind of way because you install using VSC.