python-barcode
python-barcode copied to clipboard
Incompatibility with pillow 10.0.1
barcode_format = barcode.get_barcode_class('code128')
code = barcode_format(input, writer=ImageWriter(), )
code_path = BASE_PATH + 'code'
path = code.save(code_path, {"font_size": font_size})
width, height = font.getsize(subtext)\nAttributeError: 'FreeTypeFont' object has no attribute 'getsize'
Which version are you using?
The error AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
occurs because Pillow 10, removed the method getsize
.
On Thu, 4 Apr 2024, at 11:19, richardmarktl wrote:
The error
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
occurs because Pillow 10, removed the methodgetsize
.
Which version are you using?
Which version are you using?
10.3.0
The latest version of this library is 0.15.1.
I meant to ask which version of python-barcode, not which version or pillow.
The full stack trace is also useful in these situations.
I upgraded bar-code package to 0.15.1, also upgraded pillow to 10.3.0, it seems to be working
This was likely https://github.com/WhyNotHugo/python-barcode/issues/163
exactly, thanks for your time.
Von: Hugo @.> Gesendet: Thursday, April 4, 2024 11:56:16 PM An: WhyNotHugo/python-barcode @.> Cc: richardmarktl @.>; Comment @.> Betreff: Re: [WhyNotHugo/python-barcode] Incompatibility with pillow 10.0.1 (Issue #221)
This was likely https://github.com/WhyNotHugo/python-barcode/issues/163
— Reply to this email directly, view it on GitHubhttps://github.com/WhyNotHugo/python-barcode/issues/221#issuecomment-2038300119, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AACKPHCCOU5E7EMUJGPFIXLY3XEABAVCNFSM6AAAAABD2DEUZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZYGMYDAMJRHE. You are receiving this because you commented.Message ID: @.***>