-
Notifications
You must be signed in to change notification settings - Fork 5
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
apparent infinite loop with scale=float #11
Comments
Thanks for your report. You're right, I didn't expect float numbers. Segno itself deals with this problem (i.e. the PNG serializer) by silently converting the number to an integer |
'always round' sounds good to me do you want me to send this PR? |
Handle multiple Pillow versions, use Python 3.10 as default test suite runner
I implemented a solution: Convert scale to int since it is the default behaviour of Segno. I will publish a new release in the next few days. Thanks for finding the bug! |
Hi! I think there's an infinite loop in
to_artistic()
when scale is a float. Example:I'm using qrcode-artistic==2.1.0, segno==1.5.2
I think this is happening here:
https://github.com/heuer/qrcode-artistic/blob/b93c548/qrcode_artistic.py#L140-L141
as you can see, this loops forever with any non-integer
is it reasonable to add a check before the loop which crashes if
round(scale) != scale
? I'm happy to submit this PR if that's useful to you.thanks for this library, I love the results
The text was updated successfully, but these errors were encountered: