Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating/Downgrading Arduino-Pico core fails at file extraction #11842

Open
maxgerhardt opened this issue Nov 27, 2022 · 4 comments
Open

Updating/Downgrading Arduino-Pico core fails at file extraction #11842

maxgerhardt opened this issue Nov 27, 2022 · 4 comments
Assignees
Labels
Type: Bug Waiting for feedback More information must be provided before we can proceed

Comments

@maxgerhardt
Copy link

maxgerhardt commented Nov 27, 2022

Versions

Arduino IDE: Latest 1.8.19
OS: Windows 11 x64, (ver: Version 10.0.22000.1219), in Oracle VirtualBox from Microsoft
Arduino-Pico: 2.6.3 -> 2.6.1

Description

Per earlephilhower/arduino-pico#976.

Users report that when upgrading or downgrading the Arduino-Pico core from 2.6.1 to 2.6.3 (or reverse), updating of the core would fail at the Python interpreter. This leaves the Python interpreter package folder without some crucial files without which it cannot start, and so users get a

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

when attempting to further compile something.

Reproduction

The steps I used (some may not be needed though):

  1. Install the Arduino IDE from the .zip package for Windows
  2. Install Arduino-Pico's latest version as described
  3. Compile a blink sketch for the Pico. It should compile normally
  4. Close the Arduino IDE
  5. Install Python3 from https://www.python.org/downloads/, tick the checkmark for "Add python to PATH"
  6. Reopen the Arduino IDE
  7. Go to the board manager to downgrade the RP2040 core to 2.6.1

Expected Behavior

The downgrade is done successfully.

Actual behavior

The downgrade fails with

grafik

Exception text

 Can't extract file C:\Users\User\AppData\Local\Arduino15\packages\rp2040\tools\pqt-python3\1.0.1-base-3a57aed\_ctypes.pyd, file already exists!
java.lang.RuntimeException: java.io.IOException: Can't extract file C:\Users\User\AppData\Local\Arduino15\packages\rp2040\tools\pqt-python3\1.0.1-base-3a57aed\_ctypes.pyd, file already exists!
	at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:179)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Can't extract file C:\Users\User\AppData\Local\Arduino15\packages\rp2040\tools\pqt-python3\1.0.1-base-3a57aed\_ctypes.pyd, file already exists!
	at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:215)
	at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
	at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:141)
	at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
	... 1 more

The Python folder is half-deleted / upgraded, with many files missing, crippling it so heavily that python3.exe cannot start anymore.

grafik

Should look like

grafik

Additional context

Additional reports

@maxgerhardt
Copy link
Author

More users are running into this problem here. Any insights?

@per1234
Copy link
Collaborator

per1234 commented Dec 14, 2022

@maxgerhardt please check whether the problem occurs with the latest version of Arduino IDE 2.x and then comment here to let me know the result.

@per1234 per1234 self-assigned this Dec 14, 2022
@per1234 per1234 added Type: Bug Waiting for feedback More information must be provided before we can proceed labels Dec 14, 2022
@NicolaP8
Copy link

NicolaP8 commented Jan 6, 2023

Hi,
I got the same error multiple times with IDE 1.8.19 and versions 2.6.x/2.7.0.
I had to remove the board then reinstall.

I've Win 10 with Python 3.11 installed and added to PATH.

@AeroSynth
Copy link

AeroSynth commented Jun 21, 2023

I get the same error with 3.3.0
However, if I remove it and use 3.2.2, it compiles.
Setup:
Windows 10
Python 3.9.5 (Path variables set and runs at command line)
Arduino IDE 1.8.19

So something is broken with 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Waiting for feedback More information must be provided before we can proceed
Projects
None yet
Development

No branches or pull requests

4 participants