platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.21k stars 195 forks source link

Start PIO Home Server #3137

Closed cjogo closed 2 years ago

cjogo commented 2 years ago

%23 Description of problem Leave a comment...

BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN

============================================================

An unexpected error occurred. Further steps:

============================================================

at /home/comp/.vscode/extensions/platformio.platformio-ide-2.4.3/node_modules/platformio-node-helpers/dist/index.js:1:9851
at ChildProcess.c (/home/comp/.vscode/extensions/platformio.platformio-ide-2.4.3/node_modules/platformio-node-helpers/dist/index.js:1:5134)
at ChildProcess.emit (node:events:390:28)
at ChildProcess.emit (node:domain:475:12)
at maybeClose (node:internal/child_process:1064:16)
at Socket.<anonymous> (node:internal/child_process:450:11)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at Pipe.<anonymous> (node:net:687:12)
cjogo commented 2 years ago

Obsolete PIO Core v5.2.5 is used (previous was 6.0.0a1) Please remove multiple PIO Cores from a system: https://docs.platformio.org/page/faq.html#multiple-platformio-cores-in-a-system


Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; board: pico; framework: arduino)

ivankravets commented 2 years ago

Run pio upgrade --dev. Restart VSCode.

danilomendonca commented 2 years ago

Hi there,

I am facing the same issue. I was attempting to start native unit tests in debug mode, so I have upgraded to the unstable PIO Core (6.0.0a1). Once I have concluded these tests (without success), I rollbacked to the stable version following the instructions on the Platformio CLI installation page.

After successfully returning to the stable version (PIO Core 5.2.5), I started seeing the same error mentioned in this thread:

TypeError: __init__() got an unexpected keyword argument 'uri'

Also intriguing, I am seeing the following warning:

Obsolete PIO Core v5.2.5 is used (previous was 6.0.0a1)

which makes no sense as I have uninstalled the unstable version. To be sure, I have double-checked that a single installation method was in place -- I have removed pip-based installation in favor of the virtual environment approach (installed through PIO scripts). The warning message is still there even if I switch methods -- removing any reference from PATH to the virtual env installation and installing PIO Core through pip.

Using the unstable PIO Core is not an option for my safety-critical software, hence I wonder what is preventing me from using the stable version -- are there any python scripts that got updated and not rollbacked?

As a temporary solution, I have added "uri" to the list of expected arguments of the PackageSpec in meta.py. I couldn't figure out how this argument ended up in the constructor list -- if I print the list of arguments for each package before calling the constructor, uri does not show up for the first package that breaks the script (toolchain-gccarmnoneeabi), nor it is present in .piopm file from that same package folder.

Any support on this will be appreciated.

Regards, Danilo

ivankravets commented 2 years ago

@danilomendonca - just remove ~/.platformio folder and restart IDE.

Did you have any problems with PlatformIO Core 6.0?

danilomendonca commented 2 years ago

@ivankravets thanks.

To be honest I did not know there was a new major available. We tend to be conservative regarding upgrades in our stack due to the critical nature of our product. My intent to use the edge version was to experiment with debugging in native unit tests.

I will take some time to study the notes and migration steps in a sandbox environment. If everything goes well, I will suggest the latest stable version to the team.