Skip to content
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 #141

Closed
jpavonmCBRE opened this issue Sep 30, 2024 · 1 comment

Comments

@jpavonmCBRE
Copy link

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
Copy link
Owner

heuer commented Oct 7, 2024

Fixed acc. to lincolnloop/python-qrcode#378

@heuer heuer closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants