Fatal Python error

Hi,
I just downloaded the latest Arduino IDE 2.3. 0. When I do a compile for the Raspberry PI Pico I get the following error:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Can any body help me fix this problem?

Thanks, Dan

Hi @DanCot. This error might be caused by a problem occurring during the installation of the "Raspberry Pi Pico/RP2040" boards platform you are using to add Raspberry Pi Pico support to Arduino IDE. If so, it might be fixed by uninstalling and then reinstalling that platform.

I'll provide instructions you can follow to do that:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you see the "Raspberry Pi Pico/RP2040 by Earle F. Philhower, III" entry.
  3. Hover the mouse pointer over the "Raspberry Pi Pico/RP2040 by Earle F. Philhower, III" entry.
    You will see a ●●● icon appear at the top right corner of the entry.
  4. Click the ●●● icon.
    A menu will open.
  5. Select "Remove" from the menu.
    An "Uninstall" dialog will open.
  6. Click the "YES" button in the "Uninstall" dialog.
    The dialog will close.
  7. Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully uninstalled platform ...

  8. Click the "INSTALL" button at the bottom of the "Raspberry Pi Pico/RP2040 by Earle F. Philhower, III" entry.
  9. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

Now try compiling the sketch for the Raspberry Pi Pico board again. Hopefully this time it will compile without that "No module named 'encodings'" error.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.