python-barcode
python-barcode copied to clipboard
Extra character added in code39
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 :

I have the same problem, does anyone have a solution?
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')
I believe this issue could be closed :)