I am using the Metro M0 Express with CircuitPython 7.3.3 on 2022-08-29; Adafruit Metro M0 Express with samd21g18
Following the instructions on the Adafruit PCF8523 Real Time Clock > RTC with CircuitPython page,
I have hooked up the Adafruit PCF8523 Real Time Clock to the Metro.
I have loaded the required libraries from adafruit-circuitpython-bundle-7.x-mpy-20230114.
* adafruit_bus_device folder
* adafruit_register folder
* adafruit_pcf8523.mpy
I saved the code in code.py, then when I run it, I get the following error:
Traceback (most recent call last):
File "code.py", line 2, in <module>
File "adafruit_pcf8523.py", line 49, in <module>
MpyError: Incompatible .mpy file. Please update all .mpy files.
How can I get this to work?
Incompatible .mpy file "adafruit_pcf8523.py"
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- DBlanding
- Posts: 21
- Joined: Sun Mar 14, 2021 7:45 am
- neradoc
- Posts: 542
- Joined: Wed Apr 27, 2016 2:38 pm
Re: Incompatible .mpy file "adafruit_pcf8523.py"
Hi, the line with the error in the pcf8523 is importing adafruit_bus_device.
A file might be corrupted, can you try deleting the adafruit_bus_device library and copying it again from the zip ?
You could try erasing the drive to cleanup in case there is an issue with the drive having been corrupted somehow. For that, backup your files and type in the REPL (or put in code.py)
An then put back your files and copy the libraries from the bundle again.
A file might be corrupted, can you try deleting the adafruit_bus_device library and copying it again from the zip ?
You could try erasing the drive to cleanup in case there is an issue with the drive having been corrupted somehow. For that, backup your files and type in the REPL (or put in code.py)
Code: Select all
import storage
storage.erase_filesystem()
- DBlanding
- Posts: 21
- Joined: Sun Mar 14, 2021 7:45 am
Re: Incompatible .mpy file "adafruit_pcf8523.py"
That got it working. I just moved the adafruit_bus_device folder to trash and drag&dropped a fresh one from the bundle. Thank you!
Please be positive and constructive with your questions and comments.