it's a matter of package stacks, says the original stacks engineer...
cause is found a package qrcode of some type, we know it has one that doesn't recognize QRCode as an object. so first make sure you've the PIL version, not qrcode.django, etc.
so install/reinstall as likely out of date as when I went make an image I just had the same error, been about 5 years since writing code, so you'll have to update these (UNINSTALL/INSTALL) is the deepest. whatever OS or IDE you're using
PIL (pilllow)
jinja2
qrccodes
pypng
pillimage
oh and you may have to make those 'trusted' installs. More than likely have to use something like
pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org Pillow
and Poof, the house of cards begets a static card.
https://bead.llc/firebrands.watch.gentransq.
Though any interest and I'll put up a free interactive web script to make these for everyone for free on BEAD.LLC