Open jpavonmCBRE opened 1 month ago
Segno is a different project and not related or compatible to this project.
The "to_artistic" method is added to a QRCode object iff qrcode-artistic is installed, see https://segno.readthedocs.io/en/latest/artistic-qrcodes.html for details.
Since Segno should not have any dependencies and can natively create PNG without Pillow, a few functions that require Pillow have been outsourced to the qrcode-artistic project.
I have no experience with PyInstaller, but I suspect that the qrcode-artistic package is missing.
No, the qrcode-artistic module is there, as I mentioned above, the code runs without any error or problem when executed as Python code file (code.py) but it does not run when compiled as .EXE file.
As said, I have no experience with PyInstaller, but I suspect that PyInstaller does not recognize qrcode-artistic as a dependency because it is never explicitly imported and the method is added dynamically, at runtime, to the QRCode object. Maybe this helps: https://pyinstaller.org/en/stable/operating-mode.html#analysis-finding-the-files-your-program-needs
But I finally found that removing the "DARK=" and "DATA_DARK=" attributes from "qr.to_artistic" it works.
to_artistic
supports data_dark etc.:
>>> qr.to_artistic(background='background.jpg', target='result.png', data_dark='green', data_light='yellow', dark='blue')
Please open an issue in Segno's repository if you encounter problems: https://github.com/heuer/segno
I'm having an error when executing a python code with qrcode and qrcode-artistic when compiled with pyinstaller. In my case, the code works when executing the python code as it is (as code by using 'python mycode.py'), BUT it does not work if I compile the code using pyinstaller. (pyinstaller does not return any error)
This is the error that I got when running the exe file:
Line 349 calls the main() block. Lines 322 and 323 have this code: