PlatformIO IDE install problem

So I tried to get that extension to work on my computer all day yesterday, today I tried on my laptop and the same error comes up… Here is said error, coming up on VSCode:

Error: Traceback (most recent call last):
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\python.py", line 170, in find_compatible_pythons
  File "C:\.platformio\python3\lib\subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\.platformio\python3\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\Vince\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe', 'C:\\.platformio\\.cache\\tmp\\get-platformio-1.0.0.py', '--no-shutdown-piohome', 'check', 'python']' returned non-zero...

This error directs me to this issue on the PlatformIO Github:

I did all the first 2 steps and the third doesn’t apply since the “.platformio” file is directly under C:
The cmd promp shows me the same error when I push this command as per step 2 (C:.platformio>python3\python.exe .cache\tmp\get-platformio-0.3.5.py)

Here is the error from the cmd promp:

Installer version: 1.0.0
Platform: Windows-10
Python version: 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
Python path: C:\.platformio\python3\python.exe
Creating a virtual environment at C:\.platformio\penv
Traceback (most recent call last):
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\python.py", line 170, in find_compatible_pythons
  File "C:\.platformio\python3\lib\subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\.platformio\python3\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\Vince\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe', 'C:\\.platformio\\.cache\\tmp\\get-platformio-1.0.0.py', '--no-shutdown-piohome', 'check', 'python']' returned non-zero exit status 9009.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\.platformio\.cache\tmp\get-platformio-1.0.0.py", line 69, in <module>
    main()
  File "C:\.platformio\.cache\tmp\get-platformio-1.0.0.py", line 61, in main
    bootstrap()
  File "C:\.platformio\.cache\tmp\get-platformio-1.0.0.py", line 47, in bootstrap
    pioinstaller.__main__.main()
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\__main__.py", line 131, in main
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\click\core.py", line 829, in __call__
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\click\core.py", line 782, in main
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\click\core.py", line 1236, in invoke
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\click\core.py", line 1066, in invoke
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\click\core.py", line 610, in invoke
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\click\decorators.py", line 21, in new_func
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\__main__.py", line 61, in cli
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\core.py", line 67, in install_platformio_core
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\core.py", line 95, in _install_platformio_core
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\penv.py", line 52, in create_core_penv
  File "C:\.platformio\.cache\tmp\.piocore-installer-zz8z2b8r\tmpvqh3cyo4\pioinstaller.zip\pioinstaller\python.py", line 191, in find_compatible_pythons
UnboundLocalError: local variable 'error' referenced before assignment

For Schwitz and Giggles, here is the Debugging information from VSCode when I try to install PlatformIO:

Error: Traceback (most recent call last):
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\python.py", line 170, in find_compatible_pythons
  File "C:\.platformio\python3\lib\subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\.platformio\python3\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\Vince\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe', 'C:\\.platformio\\.cache\\tmp\\get-platformio-1.0.0.py', '--no-shutdown-piohome', 'check', 'python']' returned non-zero exit status 9009.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\.platformio\.cache\tmp\get-platformio-1.0.0.py", line 69, in <module>
    main()
  File "C:\.platformio\.cache\tmp\get-platformio-1.0.0.py", line 61, in main
    bootstrap()
  File "C:\.platformio\.cache\tmp\get-platformio-1.0.0.py", line 47, in bootstrap
    pioinstaller.__main__.main()
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\__main__.py", line 131, in main
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\click\core.py", line 829, in __call__
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\click\core.py", line 782, in main
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\click\core.py", line 1236, in invoke
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\click\core.py", line 1066, in invoke
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\click\core.py", line 610, in invoke
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\click\decorators.py", line 21, in new_func
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\__main__.py", line 61, in cli
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\core.py", line 67, in install_platformio_core
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\core.py", line 95, in _install_platformio_core
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\penv.py", line 52, in create_core_penv
  File "C:\.platformio\.cache\tmp\.piocore-installer-5j9oer33\tmp5xe1e5c8\pioinstaller.zip\pioinstaller\python.py", line 191, in find_compatible_pythons
UnboundLocalError: local variable 'error' referenced before assignment
 -> Installer version: 1.0.0
Platform: Windows-10
Python version: 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
Python path: C:\.platformio\python3\python.exe
Creating a virtual environment at C:\.platformio\penv
	at c:\Users\Vince\.vscode\extensions\platformio.platformio-ide-2.3.0\node_modules\platformio-node-helpers\dist\index.js:1:930873	at ChildProcess.c (c:\Users\Vince\.vscode\extensions\platformio.platformio-ide-2.3.0\node_modules\platformio-node-helpers\dist\index.js:1:930767)	at ChildProcess.emit (events.js:315:20)	at ChildProcess.EventEmitter.emit (domain.js:483:12)	at ChildProcess.cp.emit (c:\Users\Vince\.vscode\extensions\platformio.platformio-ide-2.3.0\node_modules\cross-spawn\lib\enoent.js:34:29)	at maybeClose (internal/child_process.js:1021:16)	at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
v @ console.ts:137
DevTools failed to load SourceMap: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/f30a9b73e8ffc278e71575118b6bf568f04587c8/node_modules/windows-process-tree/lib/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

@PJprincefpv please help

It’s a stretch but maybe a full install of Python vs the App version from the Windows Store.

I tried that, but it seems like the “extension installer” doesn’t detect it or doesn’t care about it and uses its own portable version.

Well, thanks for bringing this to my attention - I think.

I almost feel dirty having something from Microsoft on my Linux machine, but it does install and work OK.
Obviously that doesn’t help your Windows problem, and I haven’t done tech support for Windows in so long, I’m not about to jump down that rabbit hole.

Out of curiosity, what are you planning on using it for with respect to 3D printing?

I see it has support for OpenSCAD, so I’m going to give that a good look.

I want to flash my original CR-10 8bit board with the Marlin 2.0 firmware.
Do you think a Linux VM would work better?

I know very little about the CR10. I presume you flash the firmware through an SD card, but if not, I’ll leave it to someone more familiar with it to answer.

Hopefully that’s not why your going through all that trouble with PlatformIO?

I tried PlatformIO last night. For my limited needs, and only with OpenSCAD and the Arduino IDE, I couldn’t see any real advantages to it that the latest release of OpenSCAD doesn’t do already. While OpenSCAD’s latest release is buggy and PlatformIO seems a bit more polished, having to launch (albeit automatically) a copy of OpenSCAD anyway in order to render the project, got tedious quickly.

I’m sure it has tons of features for higher level programming that I’m not likely to use.

I used an Arduino to burn a Bootloader on the printer’s board.
Now the next step (according to the tutorials) is use PlatformIO through VSCode to compile and load the Marlin Firmware (adapted for the CR-10) onto the board.
The Arduino IDE isn’t able to complile the Marlin firmware, I tried that too…
Thank you for your help!

OpenSCAD is a Linux software?

Yes, indded. OpenSCAD runs on several platforms.

I used to work in I.T.
We would do desktop support for the front office users (all Windows), but in the back, with the exception of the Exchange server, pretty much everything was Linux. I used to get teased by the other IT guys about being a “Microsoft Minion”, so at one point I set up a second computer at home and forced myself to get familiar with it. It took about a year before I could just leave the Windows machine off, having found Linux replacements for just about everything I use on a daily basis. I can’t help but wonder what I’ve saved in licensing fees and software in the last 14 years.

I’ve been gnawing on this for the past few days - for my money, Linux is a better environment for this, but I’m willing to admit that that may be just because I know *nix internals a lot better than Windows.
Basically, I’ve been following the sequences described in Teaching Tech’s updated firmware-build video. and the biggest problem I’ve found on Linux is that on the first try, the auto Build Marlin plug-in got lost on its way to some header files. I think it then built some necessary indices in the background, because after that it was fine…
On Windows, as soon as it invoked platformio.exe during the build, Norton decided that it was malware and removed it without asking for confirmation. That kind of noise in endemic on Windows, so I switched to my Linux partition and (at least from that point of view) it has been clear sailing ever since.

2 Likes

So the problem seems to have solved itself after I installed all the most recent Windows updates…
Thank you to everyone that took the time to read my post and help me.