-
Notifications
You must be signed in to change notification settings - Fork 177
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
Unable to decode QR data #124
Comments
I have a fork here which is able to read the provided QR code (and later unzip it, as per guidance on this blog post). My fork incorporates the changes from this PR and this PR. The second PR seems to be the important part - it adds a Something I've found with these QR codes, is that it seems to be important to keep the data in Hopefully this helps. |
This is helpful and yeah all of those binarys are important and shouldn't be decode unless it unziped, thanks a lot for your time and reply, you saved my alot time, now i am just hoping pyzbar to accept your pr and make a release on pypi. Thanks again I will close this once your pr is accepted. |
I just tried it, reading accuracy is low or some data is missing, i tried to read QR1 and with the data of QR1 i tried to make the same QR with https://github.com/lincolnloop/python-qrcode and both are not same, even i tried to DECODE the QR1 bytes with zip it failed, |
@MayankFawkes I can confirm that the first QR code is readable and unzippable, while the second is readable but not unzippable (I get a "bad magic number" error). I've encountered something similar with Indian QR codes, I suspect that the QR Code creation library that they are using is doing something very particular that other libraries don't do. Specifically, they appear to be using this library: QRCode.react which internally is using this very old (and seemingly no longer supported) JS library: QR.js. I think there is something specific that the old library is doing that more modern ones wouldn't be doing. Here is an example of the content of the two QR codes: First (works)
Second (doesn't work)
|
Something I missed is that in addition to the fork, you need to have at least v0.23.1 of ZBar which adds support for binary QR codes (pyzbar just wraps ZBar). See the release notes for that version here: https://github.com/mchehab/zbar/releases/tag/0.23.1 There have been other versions released since then, but I don’t think they’re specifically needed for this. |
Yeah it worked after installing latest binary of zbar. Thanks |
output in code:
[Decoded(data=b'PK\x03\x04\x14', type='QRCODE', rect=Rect(left=12, top=13, width=604, height=605), polygon=[Point(x=12, y=14), Point(x=12, y=618), Point(x=614, y=616), Point(x=616, y=13)])]
but this is incomplete data
when i am trying to decode on
https://zxing.org/w/decode.jspx
this is what i want in bytes in python. but code seems cant parse the all data.
The text was updated successfully, but these errors were encountered: