z411 / trackma

Open multi-site list manager for Unix-like systems. (ex-wMAL)
https://z411.github.io/trackma
GNU General Public License v3.0
761 stars 82 forks source link

Poster image doesn't load -- module 'PIL.Image' has no attribute 'ANTIALIAS' #698

Closed uzuto closed 12 months ago

uzuto commented 1 year ago

Error Log for trackma-gtk

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/site-packages/trackma/ui/gtk/imagebox.py", line 44, in run
    self._save_image(self._download_file())
  File "/usr/lib/python3.11/site-packages/trackma/ui/gtk/imagebox.py", line 61, in _save_image
    image.thumbnail((self._width, self._height), Image.ANTIALIAS)
                                                 ^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

Error Log for trackma-qt

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/trackma/ui/qt/workers.py", line 58, in run
    im.thumbnail((self.size[0], self.size[1]), Image.ANTIALIAS)
                                               ^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
[1]    12059 IOT instruction (core dumped)  trackma-qt

I have python-pillow installed. OS : Arch Linux

uzuto commented 12 months ago

Thanks! replacing image.ANTIALIAS with image.LANCZOS worked but its very slow

z411 commented 12 months ago

Is it slower? I thought Antialias was an alias for Lanczos. Although now that I think of it Lanczos is probably overkill.

molkoback commented 12 months ago

They are the same.