AttributeError: module 'PIL.Image' has no attribute 'CUBIC'
yefan-abcdefg opened this issue · 7 comments
Desktop (please complete the following information):
Windows Anaconde3
ttkbootstrap Version [e.g. 1.10.1]
Python Version 3.8.16
pip Version 20.0.1
pillow Version 10.0.1
Describe the bug
When I copy the __main__.py
to my test project and run whith pyinstaller --hidden-import=ttkbootstrap demo.py
, it‘s show an error like this.
File "ttkbootstrap/widgets.py", line 856, in _draw_meter
AttributeError: module 'PIL.Image' has no attribute 'CUBIC'
the Error code:
img.resize((self._metersize, self._metersize), Image.CUBIC)
I found Image.LANCZOS
maybe worked.
Can anyone tell me the reason?
version mismatch?or just a bug?
I don't want to change widgets.py's code and want have a suitable envs or version.
To Reproduce
No response
Expected behavior
No response
Screenshots
No response
Additional context
No response
Please people, look at exsisting issues before opening a new one. There are a dozen of issues here already about the exact same problem.
Unfortunately it wasn't fixed, because @israel-dryer isn't very active, but you can look at solutions in other threads, for example in #480
Please people, look at exsisting issues before opening a new one. There are a dozen of issues here already about the exact same problem. Unfortunately it wasn't fixed, because @israel-dryer isn't very active, but you can look at solutions in other threads, for example in #480
Think you for reminding me. I'm try use my way, and it works.
I'm fixed it by changing From Image.CUBIC
to Image.LANCZOS
.
Maybe change to Image.BICUBIC
is the best,but my method seen useful also.
怎么这类问题还不解决,刚好想美化下tk,下了发现一堆类似的错误。2024年了5月份了,你们还不更新啊
Until the Pypi package is updated you can download the package from here and install it manually.
前面的@huangstoner,有问题第一时间不找自己问题跑过来抱怨牛魔那 前面已经说了作者本人并不是很活跃所以更新不及时还在这叫 不想用别用