module 'PIL.Image' has no attribute 'VERSION'

Bug #1851130 reported by Robert Kubík (Pastierovič)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Advanced Comic Book Format
Fix Released
Undecided
Unassigned

Bug Description

$ acbfv
Traceback (most recent call last):
  File "/usr/bin/acbfv", line 53, in <module>
    assert Image.VERSION >= '1.1.5'
AttributeError: module 'PIL.Image' has no attribute 'VERSION'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 109,
in apport_excepthook
    pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
  File "/usr/lib/python3/dist-packages/apport/report.py", line 550, in
add_proc_info
    self.add_proc_environ(pid, extraenv)
  File "/usr/lib/python3/dist-packages/apport/report.py", line 619, in
add_proc_environ
    env = _read_file('environ', dir_fd=proc_pid_fd).replace('\n', '\\n')
  File "/usr/lib/python3/dist-packages/apport/report.py", line 73, in
_read_file
    with open(path, 'rb', opener=lambda path, mode: os.open(path, mode,
dir_fd=dir_fd)) as fd:
  File "/usr/lib/python3/dist-packages/apport/report.py", line 73, in
<lambda>
    with open(path, 'rb', opener=lambda path, mode: os.open(path, mode,
dir_fd=dir_fd)) as fd:
TypeError: argument should be integer or None, not list

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/acbfv", line 53, in <module>
    assert Image.VERSION >= '1.1.5'
AttributeError: module 'PIL.Image' has no attribute 'VERSION'

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan

$ python --version
Python 2.7.17rc1

$ python3 --version
Python 3.7.5rc1

Revision history for this message
Robert Kubík (Pastierovič) (just-me) wrote :

VERSION attribute is deprecated in new version of Pillow library, there's __version__ instead.
Workaround fix:

try:
  im_ver = Image.__version__
except AttributeError:
  im_ver = Image.VERSION
assert im_ver >= '1.1.5'

Changed in acbf:
status: New → Confirmed
Changed in acbf:
status: Confirmed → Fix Committed
Changed in acbf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.