Closed Siddharth1India closed 1 year ago
Thanks for your msg.
You need to install the qrcode_artistic plugin, see https://segno.readthedocs.io/en/latest/artistic-qrcodes.html
If the plugin is available, the QRCode object gets magically the to_pil method.
Hi, I already install qrcode_artistic however still get the same error
Please provide more information. Do you have segno installed as well?
Hi @heuer ,
sego and qrcode-artistic installed.
Strange, it works for me. Can you provide the error message? Do you have Pillow installed as well?
(.venv) ~/projects/segno-test> pip install segno
Collecting segno
Using cached segno-1.5.2-py2.py3-none-any.whl (83 kB)
Installing collected packages: segno
Successfully installed segno-1.5.2
(.venv) ~/projects/segno-test> pip install qrcode-artistic
Collecting qrcode-artistic
Downloading qrcode_artistic-2.1.0-py2.py3-none-any.whl (6.8 kB)
Installing collected packages: qrcode-artistic
Successfully installed qrcode-artistic-2.1.0
(.venv) ~/projects/segno-test> pip install Pillow
Collecting Pillow
Obtaining dependency information for Pillow from https://files.pythonhosted.org/packages/3c/49/f87cecbdec4b00cc1187f01196d48c08828204cd861915fab44972dc705c/Pillow-10.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.metadata
Downloading Pillow-10.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (9.5 kB)
Downloading Pillow-10.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (3.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 7.2 MB/s eta 0:00:00
Installing collected packages: Pillow
Successfully installed Pillow-10.0.1
(.venv) ~/projects/segno-test> python
Python 3.11.5 (main, Aug 29 2023, 15:31:31) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import segno
>>> qr = segno.make('A day in the life')
>>> img = qr.to_pil()
>>> img
<PIL.PngImagePlugin.PngImageFile image mode=1 size=29x29 at 0x7F2B698C7410>
>>>
The Python version is slightly newer but it shouldn't matter.
@heuer, it works now.
pip install Pillow
and it shows already installed.to_pil()
it worksI cannot determine the root cause, but I think the issue comes from my existing environment.
Thank you
Title is the error I am getting.