You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] primehub incompatible .mpy file on center press #599
when you have no code running and press the center button on new prime hubs the console displays
ValueError: incompatible .mpy file
Expected behavior
either program run or no output, functionality like the OEM program slot and run is I think in the works and this might be related to that
Hubs with external flash currently don't have a preloaded main.py like other hubs. After you download and run a program and stop it, then pressing the button should run that program again.
I just upgraded to firmware pybricks-primehub-v3.2.0b3.zip from v3.2.0b1
That went ok but now I get this error with same program that used to work.
The program builds the .mpy file ok and downloads it but then I get the "incompatible .mpy file" error.
My system is running Python 3.10.6 which I believe makes the .mpy file for us.
I noticed that one of the recent updates upgraded the micro-python version.
Could that be a problem? Any ideas?
Thanks,
I updated from pybricksdev 1.0.0a27 to 1.0.0a29 and that fixed the .mpy file problem.
Interestingly I got another error due to this line "from math import pi" in my robot program which was ok before.
I fixed that problem, and my program is running ok now.
Appreciate the quick reply on this.
Activity
dlech commentedon Jan 15, 2022
Hubs with external flash currently don't have a preloaded
main.pylike other hubs. After you download and run a program and stop it, then pressing the button should run that program again.laurensvalk commentedon Jan 15, 2022
This currently happens if there's no program yet.
johnscary-ev3 commentedon Aug 23, 2022
Hi guys,
I just upgraded to firmware pybricks-primehub-v3.2.0b3.zip from v3.2.0b1
That went ok but now I get this error with same program that used to work.
The program builds the .mpy file ok and downloads it but then I get the "incompatible .mpy file" error.
My system is running Python 3.10.6 which I believe makes the .mpy file for us.
I noticed that one of the recent updates upgraded the micro-python version.
Could that be a problem? Any ideas?
dlech commentedon Aug 23, 2022
Make sure you are running the latest
pybricksdev(1.0.0a29 ) in your virtual environment.johnscary-ev3 commentedon Aug 23, 2022
Thanks,
I updated from pybricksdev 1.0.0a27 to 1.0.0a29 and that fixed the .mpy file problem.
Interestingly I got another error due to this line "from math import pi" in my robot program which was ok before.
I fixed that problem, and my program is running ok now.
Appreciate the quick reply on this.
laurensvalk commentedon Sep 1, 2022
This issue was fixed in pybricks/pybricks-micropython#110 but it didn't seem to have closed automatically. Closing it now.