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

Extra character added in code39

Open QuentinFarizon opened this issue 5 years ago • 3 comments

Hello, and thanks for this very simple to use module !

When generating with code39, and reading the generated barcode with a qr code scanner, it renders with an additionnal letter at the end.

Eg : generating for "B504" produces "B504K"

import barcode
Code39 = barcode.get_barcode_class('code39')
code39 = Code39('B504')
code39.save('code39_barcode')

Produces : image

QuentinFarizon avatar Aug 18 '20 06:08 QuentinFarizon

I have the same problem, does anyone have a solution?

Vini-Dev-Py avatar Aug 28 '20 19:08 Vini-Dev-Py

Looks like it's the checksum digit. Can you try:

import barcode
Code39 = barcode.get_barcode_class('code39')
code39 = Code39('B504', add_checksum=False)
#                       ^ Add this argument here
code39.save('code39_barcode')

WhyNotHugo avatar Aug 28 '20 20:08 WhyNotHugo

I believe this issue could be closed :)

marcoaaguiar avatar Jun 20 '21 15:06 marcoaaguiar