friendlyVRI icon indicating copy to clipboard operation
friendlyVRI copied to clipboard

Recent Update breaks old Python code

Open XhrisPhillips opened this issue 1 year ago • 0 comments

The recent push request by me has broken things on older versions of Python:

Debian GNU/Linux 11 (bullseye)
Python 3.9.2
Pillow                   8.1.2

This version of the Pillow does not know the Resampling Method:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/home/vlbi/friendlyVRI/Imports/util_tk.py", line 1069, in _load_preview
    imgPIL.thumbnail(self.thumbSize, Image.Resampling.LANCZOS)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 62, in __getattr__
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
AttributeError: module 'PIL.Image' has no attribute 'Resampling'

Maybe the 2 relevant lines need check the version?

XhrisPhillips avatar Nov 20 '24 10:11 XhrisPhillips