Skip to content

Update __init__.py#47

Closed
jinlygenius wants to merge 1 commit intoWhyNotHugo:masterfrom
jinlygenius:master
Closed

Update __init__.py#47
jinlygenius wants to merge 1 commit intoWhyNotHugo:masterfrom
jinlygenius:master

Conversation

@jinlygenius
Copy link
Copy Markdown

remove parameter 'options' in function generate, barcode = get(name, code, writer, options), as passing 'options' raises exception in Code128(code, writer, **options)

remove parameter 'options' in function generate, barcode = get(name, code, writer, options), as passing 'options' raises exception in Code128(code, writer, **options)
@WhyNotHugo
Copy link
Copy Markdown
Owner

Do you have an example of failing code, or of what this change fixes?
This seems to work fine for me:

import barcode
from barcode.writer import ImageWriter

barcode.generate('code128', 'hi', ImageWriter(), '/tmp/1.png')

@mokko
Copy link
Copy Markdown

mokko commented Aug 24, 2019

Doesn't seem to work when setting these kind of options={'module_width':4.0, 'module_height':10.0}

@AlanSwenson
Copy link
Copy Markdown
Contributor

I believe this is the same error in issue #38

@WhyNotHugo
Copy link
Copy Markdown
Owner

Finally figured it out. This PR breaks other types of barcodes. I've pushed a different change that also fixes this issue. Thanks for the PR though, that to it I found where the problem was! 🍰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants