israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.9k stars 381 forks source link

python -m ttkcreator command does not work! #480

Closed Gabriel-Debono-Tanti closed 10 months ago

Gabriel-Debono-Tanti commented 1 year ago

Desktop (please complete the following information):

OS: Win 10 ttkbootstrap Version: 1.10.1

Describe the bug

When pasting the command in Command Prompt you get an error

To Reproduce

Open Command Prompt Paste: python -m ttkcreator See error

Expected behavior

I expected a Window to open.

Screenshots

No response

Additional context

File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkcreator__main.py", line 471, in creator = ThemeCreator() ^^^^^^^^^^^^^^ File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkcreator__main.py", line 23, in init__ self.demo_widgets = DemoWidgets(self, self.style) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkcreator\main.py", line 245, in init self.create_left_frame() File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkcreator\main.py", line 445, in create_left_frame m = ttk.Meter( ^^^^^^^^^^ File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\widgets.py", line 718, in init__ self._setup_widget() File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\widgets.py", line 759, in _setup_widget self._draw_meter() File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\widgets.py", line 856, in _draw_meter img.resize((self._metersize, self._metersize), Image.CUBIC) ^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'CUBIC'. Did you mean: 'BICUBIC'?

Gabriel-Debono-Tanti commented 1 year ago

Right I kind of fixed it by changing From Image.CUBIC to Image.BICUBIC

wrogner commented 1 year ago

Replace ttkbootstrap/widgets.py with this version widgets.py.zip

lCubosl commented 1 year ago

open your bootstrap directory and in widgets.py line 856, change .CUBIC to .BICUBIC