ttkbootstrap icon indicating copy to clipboard operation
ttkbootstrap copied to clipboard

module 'PIL.Image' has no attribute 'CUBIC'. Did you mean: 'BICUBIC'?

Open mas6y6 opened this issue 10 months ago • 3 comments

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

widgets.zip

mas6y6 avatar Apr 19 '24 02:04 mas6y6

@israel-dryer can you please fix this on pypi.org please, EVERY user that wants to use this library has this issue :(

fooblart avatar May 02 '24 04:05 fooblart

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.

rdbende avatar May 02 '24 05:05 rdbende

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.

fooblart avatar May 02 '24 06:05 fooblart