Page 1 of 1

Incompatible .mpy file

Posted: Fri Jun 17, 2022 4:42 am
by hovdekorp
I have updated the CircuitPython and accordingly the libraries 7x on a CLUE just about 3 hours ago.
Running sample codes, from the learning guide on ADAFRUIT CLUE, I constantly get the MpyError incompatible .mpy file.

Traceback lines varies but it always refers to - as I see it - the code.py calling the adafruit_clue.mpy in the script

I have re- downloaded and updated both CircuitPython and libraries, but the error continues. So now I am out of ideas...

Re: Incompatible .mpy file

Posted: Fri Jun 17, 2022 9:48 am
by neradoc
Hi, make sure you get the libraries from the bundle: https://circuitpython.org/libraries
Also check that the CP update went right by looking at the version in boot_out.txt

That kind of issue can also come from a stray file left at the root of the drive.
If you have mpy files in the root of the CIRCUITPY drive they will take precedence over the ones in the lib directory.

If you have deleted and reinstalled every library and there's still an issue, maybe the drive is somehow corrupted, backup your files and erase the drive from the REPL. Then copy back your code.py and the libraries from the bundle.

Re: Incompatible .mpy file

Posted: Fri Jun 17, 2022 10:40 am
by hovdekorp
I have now erased run an
>>> import storage
>>> storage.erase_filesystem()

After that I have installed the latest version from libraries from the bundle: https://circuitpython.org/libraries
I have installed the files from the librarie bundle from this address: https://github.com/adafruit/Adafruit_Ci ... 220617.zip

I am trying to run this script:
https://learn.adafruit.com/adafruit-clu ... irit-level

And I get this message:
Traceback (most recent call last):
File "code.py", line 8, in <module>
MpyError: Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info.

Any other ideas for getting this to work?

Re: Incompatible .mpy file

Posted: Fri Jun 17, 2022 4:56 pm
by neradoc
There seems to be a bug in the latest version of the bundle, it should be fixed today but please try this past version:
https://github.com/adafruit/Adafruit_Ci ... g/20220611

Specifically download "adafruit-circuitpython-bundle-7.x-mpy-20220611.zip" from the assets at the bottom.

Re: Incompatible .mpy file

Posted: Sat Jun 18, 2022 5:29 am
by hovdekorp
Thanks.

That helped My clue is now working :)