-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: <class 'segno.QRCode'> object has no attribute to_artistic #378
Comments
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. |
But I finally found that removing the "DARK=" and "DATA_DARK=" attributes from "qr.to_artistic" it works. |
>>> 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:
The text was updated successfully, but these errors were encountered: