ttkbootstrap icon indicating copy to clipboard operation
ttkbootstrap copied to clipboard

ttkcreator not opening due to wrong attribute

Open MrManini opened this issue 1 year ago • 6 comments

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.

MrManini avatar Oct 12 '23 02:10 MrManini

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)

ChrisMcGowanAu avatar Oct 12 '23 06:10 ChrisMcGowanAu

Duplicate of #472, and a bunch of others.

rdbende avatar Oct 12 '23 19:10 rdbende

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

rdbende avatar Nov 29 '23 10:11 rdbende

still issue on 1.10.1

SyedOmarNooruni avatar May 07 '24 11:05 SyedOmarNooruni

Next version is not yet on Pypi

rdbende avatar May 08 '24 15:05 rdbende

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

Geomedge avatar Aug 05 '24 11:08 Geomedge