Bug 13217 - luciole does not start = "ImportError: No module named Image"
Summary: luciole does not start = "ImportError: No module named Image"
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure mga4-64-ok mga4-32-ok a...
Keywords: Triaged, validated_update
Depends on:
Blocks:
 
Reported: 2014-04-15 20:10 CEST by David GEIGER
Modified: 2014-04-18 13:53 CEST (History)
4 users (show)

See Also:
Source RPM: luciole-0.8.2-5.mga4
CVE:
Status comment:


Attachments

Description David GEIGER 2014-04-15 20:10:55 CEST
Since Mageia 4 luciole package does not start because it can't find the module named Image:

$ luciole
Traceback (most recent call last):
  File "luciole.py", line 32, in <module>
    import lucioLib
  File "/usr/share/luciole/lucioLib/__init__.py", line 25, in <module>
    from luciole_controller import *
  File "/usr/share/luciole/lucioLib/luciole_controller.py", line 35, in <module>
    import luciole_image as LI
  File "/usr/share/luciole/lucioLib/luciole_image.py", line 32, in <module>
    import Image as PIL
ImportError: No module named Image

--------------------------------------------------------------------------------

Also since Mageia 4 the 'python-imaging' package has been replaced by 'python-pillow' and therefore the problem come from 'python-pillow'.

By making a comparison between files of both packages, I saw was missing a file 'PIL.pth' in package 'python-pillow' on '%{python_sitearch}/' folder.

I create the file 'PIL.pth' in the directory "/usr/lib64/python2.7/site-packages/" and only add a comment 'PIL' into it.

$ cat /usr/lib64/python2.7/site-packages/PIL.pth
PIL


Now luciole can start and run :


$ luciole
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
2014-04-15 20:00:58,994 - luciole - INFO - MainThread - (luciole.py, 123) - Starting luciole
Traceback (most recent call last):
  File "/usr/share/luciole/lucioLib/gui/luciole_export_window.py", line 109, in _current_folder_changed
    self._entry_folder.set_text(widget.get_filename())
AttributeError: 'luciole_export_window' object has no attribute '_entry_folder'
2014-04-15 20:01:02,648 - luciole - INFO - MainThread - (luciole.py, 137) - Leaving luciole
$

-----------------------------------------------------------------------------

Maybe it is same for python3-pillow ??

Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2014-04-15 20:50:08 CEST

Keywords: (none) => Triaged
Assignee: bugsquad => makowski.mageia

Comment 1 Philippe Makowski 2014-04-15 22:05:43 CEST
no fo(In reply to David GEIGER from comment #0)
> Maybe it is same for python3-pillow ??
certainly not, since PIL didn't exist for Python3
that's one of the reason that everybody move from PIL to Pillow

I will try to patch luciole
Comment 2 Philippe Makowski 2014-04-15 22:20:37 CEST
the .pth is not the correct solution, the correct solution is as said in https://wiki.mageia.org/en/Feature:Pillow#What_could_disrupt_development_of_this_new_feature
to patch luciole

Source RPM: python-pillow-2.2.1-0.3.mga4.src.rpm => luciole-0.8.2-5.mga4

Comment 3 David GEIGER 2014-04-15 23:16:14 CEST
Ok, thanks for your help Philippe

I can patch luciole if you want, I have try what you have explain about 'import Image' and effectively it works fine with good argument 'from PIL import Image'

:)
Comment 4 Philippe Makowski 2014-04-15 23:25:09 CEST
Ok, I let you do it then.

Assignee: makowski.mageia => geiger.david68210

Comment 5 David GEIGER 2014-04-16 18:59:17 CEST
bug is now fixed on mga4 and Cauldon too. Thanks to Philippe :)

Advisory:
========================

Since Mageia 4 'python-pillow' package is a drop-in replacement for PIL, with one detail: The PIL modules now use relative imports between each other, so it is no longer possible to write "import Image" but one needs to write "from PIL import Image".
So we have added a patch to fix this change on 'luciole' package. This is the reason why 'luciole' does not start and does not work.


========================

Packages in 4/core/updates_testing:
========================
luciole-0.8.2-5.1.mga4.noarch.rpm


Source RPM: 
========================
luciole-0.8.2-5.1.mga4.src.rpm


How to test this update request:
========================
- Install 'luciole' from core/release and see if it starts and runs
normally you must have the message: 
ImportError: No module named Image
- Install 'luciole' from core/updates_testing and check if it will start and run now.
David GEIGER 2014-04-16 18:59:56 CEST

Assignee: geiger.david68210 => qa-bugs
Whiteboard: (none) => has_procedure

Comment 6 Daniel Napora 2014-04-17 11:52:25 CEST
Testing complete on mga4 64bit.

CC: (none) => napcok
Whiteboard: has_procedure => has_procedure mga4-64-ok

Comment 7 Daniel Napora 2014-04-17 12:48:19 CEST
Testing complete also on mga4 32bit.

Whiteboard: has_procedure mga4-64-ok => has_procedure mga4-64-ok mga4-32-ok

Comment 8 Rémi Verschelde 2014-04-18 00:10:51 CEST
Validating update, advisory has been uploaded.

Please push to 4 core/updates.

Keywords: (none) => validated_update
Whiteboard: has_procedure mga4-64-ok mga4-32-ok => has_procedure mga4-64-ok mga4-32-ok advisory
CC: (none) => remi, sysadmin-bugs

Comment 9 Colin Guthrie 2014-04-18 13:53:15 CEST
Update pushed: https://advisories.mageia.org/MGAA-2014-0104.html

Status: NEW => RESOLVED
CC: (none) => mageia
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.