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

ttkcreator not opening due to wrong attribute #497

Open MrManini opened 12 months ago

MrManini commented 12 months ago

ttkcreator not opening due to wrong attribute

ttkbootstrap v1.10.1 OS: Windows 10

Describe the bug

When opening the ttkcreator using python -m ttkcreator, the program doesn't run, due to an error in line 856 of widgets.py

img.resize((self._metersize, self._metersize), Image.CUBIC) ^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'CUBIC'. Did you mean: 'BICUBIC'?

To Reproduce

Run and open the ttkcreator using python -m ttkcreator on the terminal.

ChrisMcGowanAu commented 12 months ago

I get exactly the same issue. It might have something to do with PIL's replacement "pillow' when opening/using 'Meter' You can get past this by editing ~/*/site-packages/ttkbootstrap/widgets.py and putting lines 855 to 858 in an exception block ....

try: self._meterimage = ImageTk.PhotoImage( img.resize((self._metersize, self._metersize), Image.CUBIC) ) self.indicator.configure(image=self._meterimage) except Exception as e: print("Exception",e)

rdbende commented 11 months ago

Duplicate of #472, and a bunch of others.

rdbende commented 10 months ago

The issue was resolved by the merge of #490. Please close it.

SyedOmarNooruni commented 5 months ago

still issue on 1.10.1

rdbende commented 5 months ago

Next version is not yet on Pypi

Geomedge commented 2 months ago

The fix is very simple. Open Lib\site-packages/ttkbootstrap/widgets.py. Go to line 856 replace CUBIC with BICUBIC. that fixes everything. They should really update this in the next version...