New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(AttributeError) "module 'PIL.Image' has no attribute 'VERSION'". #39
Comments
Thanks for reporting the issue - it had already been noticed (but no issue raised) and pull requested, but not actually merged in or fix released The first part is now done :) |
Reopen as per comment on #29 - should use |
Actually, it also seems that I was also wondering since what version |
Fow now, added to use My PR works with current stable 0.4.5 and pillow 6.2.0. Maybe time to release a new version? Installed is pillow-6.2.0.
|
Changed PILLOW_VERSION to PIL.__version__, as it got removed with >=pillow-7.0.0. In order not to break compatibility with older versions, PILLOW_VERSION will be used as a fallback. Closes: #39 Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
Previously, this tried various combinations of version variables. However, some of these are deprecated by Pillow and the 6.0.0 release notes recommend simply using `PIL.__version` instead. This attribute is available since Pillow 3.4.0, so there is no need for any compatibility fallbacks. This relates to OpenTTD#29, OpenTTD#39 and OpenTTD#54.
Previously, this tried various combinations of version variables. However, some of these are deprecated by Pillow and the 6.0.0 release notes recommend simply using `PIL.__version` instead. This attribute is available since Pillow 3.4.0, so there is no need for any compatibility fallbacks. This relates to OpenTTD#29, OpenTTD#39 and OpenTTD#54.
Previously, this tried various combinations of version variables. However, some of these are deprecated by Pillow and the 6.0.0 release notes recommend simply using `PIL.__version` instead. This attribute is available since Pillow 3.4.0, so there is no need for any compatibility fallbacks. This relates to #29, #39 and #54.
I am working on a Windows 64 bit laptop with Conda v2019.03, running a Python 3.6.0 environment. After installing all the dependencies, when I try to run
nmlc -h
it shows me the following error:nmlc ERROR: nmlc: An internal error has occurred: nmlc-version: 0.4.5 Error: (AttributeError) "module 'PIL.Image' has no attribute 'VERSION'". Command: ['C:\\ProgramData\\Anaconda3\\envs\\py3.6\\Scripts\\nmlc'] Location: File "c:\programdata\anaconda3\envs\py3.6\lib\site-packages\nml\version_info.py", line 74, in get_lib_versions
Workaround
After a quick round of googling, I found that the issue is with Pillow v6.0.0. Uninstalling it and doing
pip install pillow==5.4.1
solved the issue for me.I hope this helps anyone else who might have the same issue.
The text was updated successfully, but these errors were encountered: