Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 2e113b7

Browse files
committed
Log Java ZXing library version if decoding fails
The Java ZXing library contains a fair number of version-specific gaps and quirks. For example, prior to the patch I contributed in zxing/zxing@2040598 (which is not yet in a release), ZXing would fail to decode PDF417 barcodes in vertical orientations, which are very common in airline boarding passes. So it's useful to log the ZXing library version in order to address users' questions about differences between different ZXing decoder interfaces.
1 parent 50e0d65 commit 2e113b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

zxing/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def main():
3838
else:
3939
print("%s\n%s" % (fn, '=' * len(fn)))
4040
if not bc:
41-
print(" ERROR: Failed to decode barcode.")
41+
print(" ERROR: Failed to decode barcode (using Java ZXing library v%s)." % bcr.zxing_version)
4242
else:
4343
print(" Decoded %s barcode in %s format." % (bc.type, bc.format))
4444
print(" Raw text: %r" % bc.raw)

0 commit comments

Comments
 (0)