Page MenuHomePhabricator

Import error for PIL module
Closed, DeclinedPublic

Description

import catimages

Traceback (most recent call last):

File "<pyshell#2>", line 1, in <module>
  import catimages
File "catimages.py", line 66, in <module>
  from PIL import Image   # new 'PIL' fork 'Pillow' (fedora 19)

ImportError: No module named PIL


Version: compat-(1.0)
Severity: minor

Details

Reference
bz57017

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:36 AM
bzimport set Reference to bz57017.
bzimport added a subscriber: Unknown Object (????).

What is the bug?

The catimages code is:

try:
    import Image            # classic 'PIL'
except ImportError:
    from PIL import Image   # new 'PIL' fork 'Pillow' (fedora 19)

http://git.wikimedia.org/commit/pywikibot%2Fcompat.git/5dc246cd5f17aea47383de4e599977bfa3d37a07

I think compat tries to automatically install every dependency, so this bug might be that PIL/Pillow needs to be added to externals/__init__.py

Or, it could provide a nice error message if it failed to find the package after two imports.

Also it isnt not documented at
https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Dependencies

Aklapper lowered the priority of this task from Low to Lowest.Jun 5 2015, 1:41 PM
Aklapper subscribed.

Pywikibot has two versions: Compat and Core. This task was filed about the older version, called Pywikibot-compat, which is not under active development anymore. Hence I'm lowering the priority of this task to reflect the reality. Unfortunately, the Pywikibot team does not have the manpower to retest every single bug report / feature request against the (maintained) Pywikibot code base. Furthermore, the code base of Pywikibot-Compat has changed a lot compared to the code base of Pywikibot-Core so there is a chance that the problem described in this task might not exist anymore. Please help: Unfortunately manpower is limited and does not allow testing every single reported task again. If you have time and interest in Pywikibot, please upgrade to Pywikibot-Core and add a comment to this task if the problem in this task still happens in Pywikibot-Core (or directly edit the task by removing the Pywikibot-compat project and adding the Pywikibot project to this task). To learn more about Pywikibot and to get involved in its development, please check out https://www.mediawiki.org/wiki/Manual:Pywikibot/Development Thank you for your understanding.

Xqt claimed this task.

Won't fix anymore