Unable to animate qr using .to_artistic()
Closed this issue · 6 comments
I am unable to get a QR code to animate using the .to_artistic()
The QR code generates with the background but it's a frozen .gif and never animates. I've tried this on both Linux and Windows machines but get the same result. I've tried using both Python v3.9.2 and Python v3.10.7
Example code taken from here
`# animated_qrcode.py
import segno
from urllib.request import urlopen
slts_qrcode = segno.make_qr("https://www.youtube.com/watch?v=hTWKbfoikeg")
nirvana_url = urlopen("https://media.giphy.com/media/LpwBqCorPvZC0/giphy.gif")
slts_qrcode.to_artistic(
background=nirvana_url,
target="animated_qrcode.gif",
scale=5,
)`
Hey, I had the same issue today, and found out that running the command:
pip install setuptools
installed the missing package for it to work.
Hope this helps.
Hey, I had the same issue today, and found out that running the command:
pip install setuptools
installed the missing package for it to work.
Hope this helps.
Thanks for the suggestion, however I already have that installed.
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (52.0.0)
I'm not receiving any error message, everything generates the QR code just fine, the only problem is they don't animate.
There was a bug introduced in release 3.0.0, see heuer/qrcode-artistic#12.
Animated QR code do not work. I'll release a fixed version today.
Should work now. Please use qrcode-artistic 3.0.2 (pip install -U qrcode-artistic
).
Confirmed it's working. Thank you!!!!
Hey, I had the same issue today, and found out that running the command:
pip install setuptools
installed the missing package for it to work.
Hope this helps.
A new version of Segno was released as well. setuptools shouldn't be a requirement anymore. Segno uses the standard lib to provide the plugins since it drops support for Python 2 with this release.