israel-dryer / ttkbootstrap

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

Attribute Error When Executing python -m ttkcreator due to Incompatibility with Pillow - FIXED #532

Closed GabrielMouraS closed 8 months ago

GabrielMouraS commented 8 months ago

Desktop (please complete the following information):

ttkbootstrap 1.10.1 pillow 10.2.0 SO: Windows

Describe the bug

An error occurred when running python -m ttkcreator. The traceback indicates an attribute error in the ttkbootstrap module related to resizing an image. The issue arises from an attempt to use the attribute Image.CUBIC in the ttkbootstrap\widgets.py file, which is not present in the latest version of the Pillow library. To fix this, replace Image.CUBIC with Image.BICUBIC in the specified file.

To Reproduce

Steps for Correction:

  1. Open the ttkbootstrap\widgets.py file in your text editor or IDE.
  2. Locate the line containing img.resize((self._metersize, self._metersize), Image.CUBIC).
  3. Replace Image.CUBIC with Image.BICUBIC.
  4. Save the modified file.
  5. Re-run python -m ttkcreator to verify that the issue is resolved.

or replace ttkbootstrap\widgets.py widgets.zip

Expected behavior

No response

Screenshots

No response

Additional context

No response