ttkbootstrap
ttkbootstrap copied to clipboard
ttkcreator not opening due to wrong attribute
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.
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)
Duplicate of #472, and a bunch of others.
The issue was resolved by the merge of #490. Please close it.
still issue on 1.10.1
Next version is not yet on Pypi
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...