module 'PIL.Image' has no attribute 'VERSION'
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/
in apport_excepthook
pr.
File "/usr/lib/
add_proc_info
self.
File "/usr/lib/
add_proc_environ
env = _read_file(
File "/usr/lib/
_read_file
with open(path, 'rb', opener=lambda path, mode: os.open(path, mode,
dir_fd=dir_fd)) as fd:
File "/usr/lib/
<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
Changed in acbf: | |
status: | Confirmed → Fix Committed |
Changed in acbf: | |
status: | Fix Committed → Fix Released |
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'