1
0
Fork
You've already forked python-barcode
0

When using an ImageWriter with 'Code39' the add_checksum option is ignored #55

Closed
opened 2019年10月28日 01:21:15 +01:00 by srolin · 2 comments
srolin commented 2019年10月28日 01:21:15 +01:00 (Migrated from github.com)
Copy link

When using the generator function to create a 'Code39' barcode, the writer_options={'add_checksum': False} is ignored.

The addition of the check digit happens during the class init which hasn't received the writer_options.

I have a fix for this by moving the check into the render function and adding an instance variable to track when it has been added. (I wasn't sure if the render function could end up being called more than once and didn't want additional check digits adding.

Will create a PR for the fix.

When using the generator function to create a 'Code39' barcode, the writer_options={'add_checksum': False} is ignored. The addition of the check digit happens during the class __init__ which hasn't received the writer_options. I have a fix for this by moving the check into the render function and adding an instance variable to track when it has been added. (I wasn't sure if the render function could end up being called more than once and didn't want additional check digits adding. Will create a PR for the fix.
srolin commented 2019年10月28日 15:51:04 +01:00 (Migrated from github.com)
Copy link

Breaking code:
generate('code39', my_bar_code, writer=ImageWriter(), output='fp_svg', writer_options={'add_checksum': False})
Continued to add a checksum.

Breaking code: `generate('code39', my_bar_code, writer=ImageWriter(), output='fp_svg', writer_options={'add_checksum': False})` Continued to add a checksum.
WhyNotHugo commented 2020年02月25日 02:22:18 +01:00 (Migrated from github.com)
Copy link

I believe this is fixed. Lemme know if you still have any issues.

I believe this is fixed. Lemme know if you still have any issues.
Sign in to join this conversation.
No Branch/Tag specified
main
pre-commit-ci-update-config
extensibility
fix_sizes
feature/longer_guard_bar
ean-without-checksum
readme-formatting
cleaning
cleanup
srolin/master
michieldwitte/left-alignment-fix
v0.13.1
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.3
v0.8.2
v0.8.1
v0.8.0
0.8beta1
0.7
0.7beta4
0.7beta3
0.7beta2
v0.6
v0.6b3
v0.6b2
v0.6b1
v0.5.0
v0.5.0b1
v0.4.3
v0.4.2
v0.4.1
v0.4
v0.4b2
v0.4b1
v0.3
v0.3b1
v0.2.1
v0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WhyNotHugo/python-barcode#55
Reference in a new issue
WhyNotHugo/python-barcode
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?