Internal Server Error while using PlatformIO extension in VSCode

470 Views Asked by At

PlatformIO was working fine. All of a sudden it started showing Internal Server Error when clicking PIO Home-->Open

Other features like:

Update All

Core CLI works.

1

There are 1 best solutions below

0
On BEST ANSWER

Entering pio home command in the PlatformIO Core CLI revealed the problem.

It showed module 'anyio' has no attribute 'to_thread' error.

I updated anyio to 3.5 and it sorted the problem.

Conclusion: This "all of a sudden" seems to be because of a switch from Python 3.10 to Python 3.8.3 which I had to do for another project at some point and 3.8.3 did not have the required anyio.

For anyone else bumping into this question with this same error trying

pio home

in the PlatformIO Core CLI may lead to a solution.