AttributeError: <class 'segno.QRCode'> object has no attribute to_artistic
Closed this issue · 1 comments
jpavonmCBRE commented
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:
File "ORIGINAL_code.py", line 323, in main
File "segno\__init__.py", line 970, in __getattr__
AttributeError: <class 'segno.QRCode'> object has no attribute to_artistic
[7552] Failed to execute script 'ORIGINAL_code' due to unhandled exception!
Line 349 calls the main() block.
Lines 322 and 323 have this code:
qr = helpers.make_wifi(ssid, guestPsk, security)
qr.to_artistic(background='green.png', target='QR-CODE.png', dark='#012A2D', data_dark='#003F2D', data_light='white', scale=8)
But I finally found that removing the "DARK=" and "DATA_DARK=" attributes from "qr.to_artistic" it works.
Is this an interoperability error between segno and qrcode-artistic?
heuer commented
Fixed acc. to lincolnloop/python-qrcode#378