Bug 13500 - phatch does not start = "ImportError: No module named Image"
Summary: phatch 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: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure MGA4-64-OK MGA4-32-OK a...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2014-06-09 08:16 CEST by David GEIGER
Modified: 2014-06-19 22:41 CEST (History)
5 users (show)

See Also:
Source RPM: phatch-0.2.7.1-7.mga4.src.rpm
CVE:
Status comment:


Attachments

Description David GEIGER 2014-06-09 08:16:44 CEST
Since Mageia 4 phatch package does not start because it can't find the module named Image:

$ phatch 
Traceback (most recent call last):
  File "/usr/bin/phatch", line 16, in <module>
    main(config_paths, app_file = __file__)
  File "/usr/lib/python2.7/site-packages/phatch/app.py", line 203, in main
    from core.settings import create_settings
  File "/usr/lib/python2.7/site-packages/phatch/core/settings.py", line 23, in <module>
    from pil import IMAGE_READ_EXTENSIONS
  File "/usr/lib/python2.7/site-packages/phatch/core/pil.py", line 33, in <module>
    import Image
ImportError: No module named Image

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

How reproducible:

Every time when I running  Ocrfeeder



Steps to Reproduce:
1.run from menu ocrfeeder


So phatch need also a patch to fix import module Image with python-pillow.

Reproducible: 

Steps to Reproduce:
David GEIGER 2014-06-09 08:17:29 CEST

Assignee: bugsquad => geiger.david68210

David GEIGER 2014-06-09 08:17:41 CEST

Hardware: i586 => All

Comment 1 David GEIGER 2014-06-09 11:11:50 CEST
bug on 'phatch' package is now fixed on mga4 and Cauldron too.


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 'phatch' package. This is the reason why 'phatch' does not start and does not work.


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

Packages in 4/core/updates_testing:
========================
phatch-0.2.7.1-7.1.mga4.x86_64.rpm
phatch-0.2.7.1-7.1.mga4.i586.rpm


Source RPM: 
========================
phatch-0.2.7.1-7.1.mga4.src.rpm


How to test this update request:
========================
- Install 'phatch' from core/release and see if it starts and runs,
  normally you must have the message:

"ImportError: No module named Image"

- Install 'phatch' from core/updates_testing and check if it will start and run now.

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

Comment 2 David GEIGER 2014-06-09 11:17:42 CEST
Oupps! sorry a forgetfulness

Packages in 4/core/updates_testing:
========================
phatch-0.2.7.1-7.1.mga4.x86_64.rpm
phatch-doc-0.2.7.1-7.1.mga4.x86_64.rpm
phatch-nautilus-bindings-0.2.7.1-7.1.mga4.x86_64.rpm
phatch-0.2.7.1-7.1.mga4.i586.rpm
phatch-doc-0.2.7.1-7.1.mga4.i586.rpm
phatch-nautilus-bindings-0.2.7.1-7.1.mga4.i586.rpm
Comment 3 Arnaud Vacquier 2014-06-11 23:50:29 CEST
Hi,

Mageia 4 x86_64 real :

=before=
# urpmi phatch
Le paquetage phatch-0.2.7.1-7.mga4.x86_64 est déjà installé
[root@localhost aranud]# su aranud
[aranud@localhost ~]$ phatch
Traceback (most recent call last):
  File "/usr/bin/phatch", line 16, in <module>
    main(config_paths, app_file = __file__)
  File "/usr/lib/python2.7/site-packages/phatch/app.py", line 203, in main
    from core.settings import create_settings
  File "/usr/lib/python2.7/site-packages/phatch/core/settings.py", line 23, in <module>
    from pil import IMAGE_READ_EXTENSIONS
  File "/usr/lib/python2.7/site-packages/phatch/core/pil.py", line 33, in <module>
    import Image
ImportError: No module named Image


=after=

#  urpmi phatch
Le paquetage phatch-0.2.7.1-7.1.mga4.x86_64 est déjà installé


Okay it is start (user and root) but :

In user :
There are many error about permission in first launch only :

[...]
find: â/etc/cups/sslâ: Permission non accordée
find: â/etc/cups/sslâ: Permission non accordée
find: â/etc/polkit-1/rules.dâ: Permission non accordée
find: â/etc/polkit-1/rules.dâ: Permission non accordée
find: â/run/udisks2â: Permission non accordée
find: â/run/udisks2â: Permission non accordée
find: â/run/udisksâ: Permission non accordée
find: â/run/udisksâ: Permission non accordée
find: â/run/openvpnâ: Permission non accordée
find: â/run/cups/certsâ: Permission non accordée
find: â/run/openvpnâ: Permission non accordée
find: â/run/cups/certsâ: Permission non accordée
find: â/run/systemd/inaccessibleâ: Permission non accordée
find: â/run/systemd/inaccessibleâ: Permission non accordée
find: find: â/usr/share/polkit-1/rules.dââ/usr/share/polkit-1/rules.dâ: Permission non accordée
: Permission non accordée


In Root (it is launch):
# LC_ALL=C phatch
locate: unexpected EOF reading `/var/lib/mlocate/mlocate.db'
Gtk-Message: Failed to load module "canberra-gtk-module"
Traceback (most recent call last):
  File "/usr/bin/phatch", line 16, in <module>
    main(config_paths, app_file = __file__)
  File "/usr/lib/python2.7/site-packages/phatch/app.py", line 216, in main
    _init_fonts()
  File "/usr/lib/python2.7/site-packages/phatch/app.py", line 170, in _init_fonts
    font_dictionary(force=True)
  File "/usr/lib/python2.7/site-packages/phatch/lib/fonts.py", line 211, in font_dictionary
    f = file(WRITABLE_FONTS_CACHE_PATH, 'wb')
IOError: [Errno 2] No such file or directory: '/usr/share/phatch/cache/fonts'

CC: (none) => aranud

Philippe Makowski 2014-06-12 18:59:52 CEST

CC: (none) => makowski.mageia
Assignee: qa-bugs => geiger.david68210

Comment 4 David GEIGER 2014-06-12 19:21:29 CEST
With phatch-0.2.7.1-7.1.mga4.x86_64

weird your problem, because I have no error in user onconsole :
 
Before :

$ phatch 
Traceback (most recent call last):
  File "/usr/bin/phatch", line 16, in <module>
    main(config_paths, app_file = __file__)
  File "/usr/lib/python2.7/site-packages/phatch/app.py", line 203, in main
    from core.settings import create_settings
  File "/usr/lib/python2.7/site-packages/phatch/core/settings.py", line 23, in <module>
    from pil import IMAGE_READ_EXTENSIONS
  File "/usr/lib/python2.7/site-packages/phatch/core/pil.py", line 33, in <module>
    import Image
ImportError: No module named Image

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

After :

[david@david ~]$ phatch
[david@david ~]$
Comment 5 David GEIGER 2014-06-12 19:34:58 CEST
Why he was reassigned back to me ? then there is no problem here.

One person is not enough for test, right? is that someone else can try to see if this issue is reproductible ? as I have just done.

thank you.
Comment 6 Philippe Makowski 2014-06-12 20:06:24 CEST
(In reply to David GEIGER from comment #4)
> After :
> 
> [david@david ~]$ phatch
> [david@david ~]$
same for me

all is ok for me too
Philippe Makowski 2014-06-15 13:21:01 CEST

Assignee: geiger.david68210 => qa-bugs
Whiteboard: has_procedure => has_procedure MGA4-64-OK

Comment 7 David GEIGER 2014-06-19 18:52:08 CEST
Tested mga4_32,

Testing complete for phatch-0.2.7.1-7.1.mga4, I confirm that the bug is now fixed with this update.


Before:

$ phatch
Traceback (most recent call last):
  File "/usr/bin/phatch", line 16, in <module>
    main(config_paths, app_file = __file__)
  File "/usr/lib/python2.7/site-packages/phatch/app.py", line 203, in main
    from core.settings import create_settings
  File "/usr/lib/python2.7/site-packages/phatch/core/settings.py", line 23, in <module>
    from pil import IMAGE_READ_EXTENSIONS
  File "/usr/lib/python2.7/site-packages/phatch/core/pil.py", line 33, in <module>
    import Image
ImportError: No module named Image

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

After:

[david@localhost ~]$ phatch
[david@localhost ~]$ 


Now it start and run here.

Whiteboard: has_procedure MGA4-64-OK => has_procedure MGA4-64-OK MGA4-32-OK

Comment 8 Rémi Verschelde 2014-06-19 20:23:14 CEST
Validating update, advisory has been uploaded.

Please push "phatch" 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 Thomas Backlund 2014-06-19 22:41:29 CEST

Update pushed:
http://advisories.mageia.org/MGAA-2014-0131.html

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


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