Sorry, I don't know if this is the right place, but there seem to be similar topics here.
After update of package Raspberry Pi Pico/RP2040 to 3.6.1 I get this error, and reverting to 3.6.0 didn't help:
Compiling sketch...
"C:\\Users\\ZinggJ\\AppData\\Local\\Arduino15\\packages\\rp2040\\tools\\pqt-python3\\1.0.1-base-3a57aed/python3" -I "C:\\Users\\ZinggJ\\AppData\\Local\\Arduino15\\packages\\rp2040\\hardware\\rp2040\\3.6.0/tools/signing.py" --mode header --publickey "C:\\ZinggJ\\Arduino\\GxEPD\\GxEPD2\\examples\\GxEPD2_Example/public.key" --out "C:\\Users\\ZinggJ\\AppData\\Local\\Temp\\arduino\\sketches\\D21127B08CA7F1936C464D4530C8D77E/core/Updater_Signing.h"
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
There doesn't seem to be an issue raised yet. But maybe someone has an idea for a quick fix.
(I can use my separate test-notebook in the meantime).
Any help is appreciated!
-jz-
Hi @ZinggJM. There are some reports of this problem here:
It seems that sometimes the copy of Python that is installed along with the "Raspberry Pi Pico/RP2040" boards platform is incomplete, which leads to this error.
Some users reported they were able to work around the problem by uninstalling and then reinstalling the platform. I think they typically performed the uninstall by manually deleting the package (i.e., C:\Users\ZinggJ\AppData\Local\Arduino15\packages\rp2040), but you could try just doing an uninstall+reinstall cycle via Boards Manager if you like:
Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
Scroll down through the list of boards platforms until you see the "Raspberry Pi Pico/RP2040" entry.
Hover the mouse pointer over the "Raspberry Pi Pico/RP2040" entry.
You will see a ●●● icon appear at the top right corner of the entry.
Click the ●●● icon.
A menu will open.
Select "Remove" from the menu.
An "Uninstall" dialog will open.
Click the "YES" button in the "Uninstall" dialog.
Wait for the uninstallation to finish. ⓘ The progress will be shown by a notification at the bottom right corner of the Arduino IDE window.
Click the "INSTALL" button at the bottom of the "Raspberry Pi Pico/RP2040" entry.
Wait for the installation to finish.
Now try compiling your sketch again. Hopefully this time all will be well. If not, you can try deleting the folder manually and then installing the platform again via Boards Manager.
Something worth mentioning, as I saw it reported in the issue and have also experienced it myself, is that the "Raspberry Pi Pico/RP2040" platform tends to leave zombie Python processes running even after you close Arduino IDE. These can cause the attempt to delete the package folder to fail. If you run into that, you can kill those processes by doing this:
Start Windows Task Manager.
Check for any processes named "Python (32 bit)". They will have a command line like this:
Removing the library and reinstalling it actually worked for me. Also please note that Googling this error brings you to more general solutions, one of which is to add python to your path. I did that also and am set to go