ttkbootstrap
ttkbootstrap copied to clipboard
module 'PIL.Image' has no attribute 'CUBIC'. Did you mean: 'BICUBIC'?
Desktop (please complete the following information):
Windows 11 Home ttkbootstrap 1.10.1 (Latest version)
Describe the bug
In widgets file it there is an undefined variable in widgets.py PIL.CUBIC it needs to PIL.BICUBIC which is preventing using the meter widget:
Just replace this file with this one: widgets.zip
else:
self._draw_solid_meter(draw)
self._meterimage = ImageTk.PhotoImage(
img.resize((self._metersize, self._metersize), Image.BICUBIC)
)
self.indicator.configure(image=self._meterimage)
OLD
else:
self._draw_solid_meter(draw)
self._meterimage = ImageTk.PhotoImage(
img.resize((self._metersize, self._metersize), Image.CUBIC) #Image.CUBIC is undefined
)
self.indicator.configure(image=self._meterimage)
To Reproduce
On Version 1.10.1 just type this in terminal:
python -m ttkbootstrap
Then you will get the error
Expected behavior
The expected behavior is that the python -m ttkbootstrap
is supposed to load
Screenshots
No response
Additional context
@israel-dryer can you please fix this on pypi.org please, EVERY user that wants to use this library has this issue :(
People who really want this can still use an older PIL version or use ttkbootstrap directly from this repo, but demanding an update of the Pypi package is rather pointless, given that israel-dryer has not been available here for over a year.
Yes i understand now, my bad. it is a pretty easy fix to be honest as you just need to manually edit the file yourself and replace it, but it would be nice to see it be replaced as this is a very good project otherwise.