Skip to content
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

Error on the number generated #222

Closed
darixsamani opened this issue Mar 22, 2024 · 11 comments
Closed

Error on the number generated #222

darixsamani opened this issue Mar 22, 2024 · 11 comments
Labels

Comments

@darixsamani
Copy link

darixsamani commented Mar 22, 2024

the number generated and the bar code is different from the one I provided to the function. I use the EAN13 standard

there are differences in last number

@WhyNotHugo
Copy link
Owner

WhyNotHugo commented Mar 22, 2024 via email

@WhyNotHugo
Copy link
Owner

As a minimum to understand the issue I need:

  • The input value that you're providing
  • The number that shows up in the barcode.

@darixsamani
Copy link
Author

darixsamani commented Apr 5, 2024

for example, i provided this input: 2024012571997
the number generated is different on the last digit

2024012571997

@WhyNotHugo
Copy link
Owner

EAN13 has 13 digits, of which the last is the checksum digit. You're providing the wrong checksum, so python-barcode is replacing it with the correct digit.

The no_checksum flag should allow you to opt-out of this behaviour, but I'm noticing that it's broken right now; the original digit is lost in __init__. I'll try and patch that.

@WhyNotHugo WhyNotHugo added the bug label Apr 8, 2024
@WhyNotHugo
Copy link
Owner

I think https://github.com/WhyNotHugo/python-barcode/pull/98/files is the solution

@WhyNotHugo
Copy link
Owner

See: #43

@WhyNotHugo WhyNotHugo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
@darixsamani
Copy link
Author

@WhyNotHugo Thank you I will try this solution, and I will give my feedback

@WhyNotHugo
Copy link
Owner

#98 is not correct.

I believe #224 should work

@darixsamani
Copy link
Author

Please merge this pull request #224 for me to try

@darixsamani
Copy link
Author

I tried it and it works very well.

@darixsamani
Copy link
Author

this generates a bar code but the bar code scanner does not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants