WhyNotHugo / python-barcode

㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.
http://python-barcode.rtfd.io/
MIT License
558 stars 123 forks source link

Incompatibility with pillow 10.0.1 #221

Closed Nadern96 closed 5 months ago

Nadern96 commented 6 months ago
        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'
WhyNotHugo commented 6 months ago

Which version are you using?

richardmarktl commented 5 months ago

The error AttributeError: 'FreeTypeFont' object has no attribute 'getsize' occurs because Pillow 10, removed the method getsize.

WhyNotHugo commented 5 months ago

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 method getsize.

Which version are you using?

richardmarktl commented 5 months ago

Which version are you using?

10.3.0

WhyNotHugo commented 5 months ago

The latest version of this library is 0.15.1.

WhyNotHugo commented 5 months ago

I meant to ask which version of python-barcode, not which version or pillow.

WhyNotHugo commented 5 months ago

The full stack trace is also useful in these situations.

Nadern96 commented 5 months ago

I upgraded bar-code package to 0.15.1, also upgraded pillow to 10.3.0, it seems to be working

WhyNotHugo commented 5 months ago

This was likely https://github.com/WhyNotHugo/python-barcode/issues/163

richardmarktl commented 5 months ago

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: @.***>