ImportError: no module named 'M5'
-
I am using the Stick C Plus 2
I used the M5Burner-v3-beta-win-x64 burner
Downloaded UIFlow2.0 StickC Plus2 v 2.0.7
Burnt to Stick with no error
Using UIFlow 2.0.7 at https://uiflow2.m5stack.com/
I connected the Stick via USB and the screen shows:
V1.13.4
API key
CloudI loaded a new project in UIFlow, for the correct device.
Run > Connect
Connected to serial port
RunTraceback (most recent call last):
File "_flow.py", line 41, in <module> KeyboardInterrupt: MicroPython 9d61eff07-dirty on 2024-04-25; M5StickC-Plus2 with ESP32 Type "help()" for more information. >>> MicroPython 9d61eff07-dirty on 2024-04-25; M5StickC-Plus2 with ESP32 Type "help()" for more information. >>> >>> import gc >>> gc.collect() >>> paste mode; Ctrl-C to cancel, Ctrl-D to finish === import os, sys, io === import M5 === from M5 import * === def setup(): === M5.begin() === def loop(): === M5.update() === if __name__ == '__main__': === try: === setup() === while True: === loop() === except (Exception, KeyboardInterrupt) as e: === try: === from utility import print_error_msg === print_error_msg(e) === except ImportError: === print("please update to latest firmware") === === === Traceback (most recent call last): File "<stdin>", line 2, in <module> ImportError: no module named 'M5' >>>
How do I resolve this?
Thanks
Brendon -
Worked it out.
The Stick was showing V1.13.4, which was the firmware version for UIFlow 1.
I had previously flashed that onto the stick.
When I was burning UIFlow 2, it didn't erase or overwrite the V1 firmware.
I forced an erase by going to Burn / Erase.The stick is now showing the V2 firmware and I am able to flash new programs to it.