Badger 2040 Image Conversion

I’m having fun playing with the new Badger board and come to do some image conversion however am receiving the following error from

ModuleNotFoundError: No module named 'data_to_py'

I’m running the thonny terminal from the same directory that contains both 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 from and saved it in the same folder as

The conversion then ran without an issue.

Oop, yes, looks like that’s us adding new stuff to the 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 script as we’re not using that bit when converting with Thonny.

1 Like

All working well:

This is great little board.

1 Like

Ahh - I love the squirrel! 🐿