I’m having fun playing with the new Badger board and come to do some image conversion however am receiving the following error from convert.py.
ModuleNotFoundError: No module named 'data_to_py'
I’m running the thonny terminal from the same directory that contains both convert.py and the image I’m trying to convert. My first suspicion is it’s something up with the PATH variable on my machine (this has caused many headaches with my python efforts in the past) but I don’t really know where to start troubleshooting?
OK, to answer my own question, I did manage to resolve it but I’m sure it’s not the intended solution. I’ll remove this reply when there is a more solid answer.
I downloaded data_to_py.py from https://github.com/peterhinch/micropython_data_to_py and saved it in the same folder as convert.py.
The conversion then ran without an issue.
Oop, yes, looks like that’s us adding new stuff to the convert.py script to allow for baked in image conversion shenanigans when the MicroPython uf2 image is created.
Your solution works, but you can also simply comment out the
import data_to_py line in the
convert.py script as we’re not using that bit when converting with Thonny.
All working well:
This is great little board.
Ahh - I love the squirrel! 🐿