Skip to content

invalid ppem value with 0.15.1 but not with 0.14.0 #217

Open
@aegleinformatiquemedicale

Description

Hi,

If i try this with python 3.9.16

With python-barcode 0140 and Pillow 9.5.0 => OK

Python 3.9.16 (main, Jun 30 2023, 08:01:58) 
[GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import barcode
>>> from barcode.writer import ImageWriter
>>> num = 'ABC123456'
>>> try:
...     checksum = False
...     CODE39 = barcode.get_barcode_class('code39')
...     options = {'font_size': 0,'text_distance': 0.0,'module_height': 24.0,'quiet_zone': 0.0}
...     options['center_text'] = False
...     ean = CODE39(str(num), writer=ImageWriter(), add_checksum=checksum)
...     ean.save('tmp/sticker_code39_' + num, options=options)
... except Exception as err:
...     print(err)
... 
'tmp/sticker_code39_ABC123456.png'

With python-barcode 0.15.1 and Pillow 10.0.0 (same with 10.0.1) => ERR : invalid ppem value

>>> import barcode
>>> from barcode.writer import ImageWriter
>>> num = 'ABC123456'
>>> try:
...     checksum = False
...     CODE39 = barcode.get_barcode_class('code39')
...     options = {'font_size': 0,'text_distance': 0.0,'module_height': 24.0,'quiet_zone': 0.0}
...     options['center_text'] = False
...     ean = CODE39(str(num), writer=ImageWriter(), add_checksum=checksum)
...     ean.save('tmp/sticker_code39_' + num, options=options)
... except Exception as err:
...     print(err)
... 
invalid ppem value

I didn't see in your documentation what had changed.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions