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

Version 7.4 can not generate correct qrcode with url length >= 123 #304

Closed
gtxx3600 opened this issue Feb 1, 2023 · 6 comments · Fixed by #305
Closed

Version 7.4 can not generate correct qrcode with url length >= 123 #304

gtxx3600 opened this issue Feb 1, 2023 · 6 comments · Fixed by #305

Comments

@gtxx3600
Copy link

gtxx3600 commented Feb 1, 2023

tried version 7.3.1 and everything works fine

@gtxx3600 gtxx3600 changed the title Version 7.4 can not generate correct qrcode with url length > 123 Version 7.4 can not generate correct qrcode with url length >= 123 Feb 1, 2023
@mattiasj-axis
Copy link
Contributor

Can confirm, this reproducer fails to scan:

import qrcode
qr = qrcode.QRCode(version=8)
qr.add_data("This is a test")
qr.make()
qr.print_ascii(invert=True)

version <= 7 will scan
version >= 8 will not scan (tested up to 10)

@mattiasj-axis
Copy link
Contributor

Bisect says f2fee0a is the fault commit

Reverting the changes to create_bytes to how it looked before that commit solves the issue.

mattiasj-axis added a commit to mattiasj-axis/python-qrcode that referenced this issue Feb 1, 2023
@iulica
Copy link

iulica commented Feb 2, 2023

That was a bugger, yesterday 100 bills went away with a bad QR code. Please release a fix soon, or remove the buggy version.

Thanks for fixing

Edit: also, I looked for tests and couldn't find one with a larger text.

@SmileyChris
Copy link
Member

Yikes! Apologies for this bug. If someone wants to write some test against some larger qr code sizes with their expected results, that might be useful to avoid such a regression again...

I yanked the v7.4 release from pypi and just pushed the fix from @mattiasj-axis as v7.4.1

@qxsch
Copy link

qxsch commented Feb 3, 2023

@iulica i could work around this with segno. now qr code generation for bills is running stable again.

@iulica
Copy link

iulica commented Feb 3, 2023

Thanks, for me it was just installing the previous version. Unfortunately I haven't checked the bills before sending, as they looked quite fine visually. Lesson learned, next time I will quickly check them before sending :). Anyway, thanks for the quick fix and the new version.

Kind regards

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

Successfully merging a pull request may close this issue.

5 participants