python-zxing icon indicating copy to clipboard operation
python-zxing copied to clipboard

Issues in decoding PDF 417 format Barcodes

Open adiv5 opened this issue 2 years ago • 2 comments

I am trying to use zxing to decode PDF417 images. However Im getting an error message as follows:

ValueError: Unknown format code 'x' for object of type 'str'

Error seems to be in the __repr__ of the BarCode Class

Here is the File i'm using

Can I understand if there is any workaround for the same?

adiv5 avatar Jan 08 '24 10:01 adiv5

Any updates on this?

amishparekh avatar Jan 31 '24 07:01 amishparekh

What version of the Python module? zxing.__version__

What version of the Java library? zxing.BarCodeReader().zxing_version

There was a bug in the Python module related to repr() of barcodes, fixed in 50c7efe43688070d48dc10993ccff6a21516e537, and a bug in the Java library's ability to correctly output "raw bytes" for barcodes (see https://github.com/zxing/zxing/issues/1682), which the Python module currently mitigates by asking the Java library not to output them as of 07d94c542c36a8420810f8b36a4fcce63ec6ec2a.

dlenski avatar Jan 31 '24 07:01 dlenski