Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mas6y6 opened this issue Apr 19, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@mas6y6
Copy link

mas6y6 commented Apr 19, 2024

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 mas6y6 added the bug Something isn't working label Apr 19, 2024
@fooblart
Copy link

fooblart commented May 2, 2024

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

@rdbende
Copy link

rdbende commented May 2, 2024

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.

@fooblart
Copy link

fooblart commented May 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants