israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.9k stars 381 forks source link

Widgets broken in Pillow 10.0.0 #472

Closed RSyndergaard closed 10 months ago

RSyndergaard commented 1 year ago

Desktop (please complete the following information):

ttkbootstrap version 1.10.1 Pillow version 10.0.0 OS: Windows 10

Describe the bug

Bug: Widgets (eg ttkcreator, ttkbootstrap) raise an AttributeError when attempting to start with Pillow 10.0.0 due to constants changes. See release notes: https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#backwards-incompatible-changes

Affected constant is enum PIL.Image.CUBIC, which was changed to PIL.Image.BICUBIC and is not backwards compatible.

To Reproduce

  1. Upgrade Pillow with pip install --upgrade pillow
  2. Run widget with python -m ttkbootstrap or python -m ttkcreator

Expected behavior

AttributeError: module 'PIL,Image' has no attribute 'CUBIC'. Did you mean: 'BICUBIC'?

Traceback indicates widgets.py, line 856 in _draw_meter

Screenshots

image

Additional context

No response

jiazhuangle commented 1 year ago

Same question, thanks for the tip. @RSyndergaard