unable to launch uon ubuntu 13.04

Bug #1156583 reported by KEIII
104
This bug affects 24 people
Affects Status Importance Assigned to Milestone
Frets Of Fire: Severed Fifth
New
Undecided
Unassigned
Phatch
New
Undecided
Unassigned

Bug Description

unable to launch on Ubuntu 13.04 amd64

Traceback (most recent call last):
  File "/usr/bin/phatch", line 16, in <module>
    main(config_paths, app_file = __file__)
  File "/usr/share/phatch/phatch/app.py", line 203, in main
    from core.settings import create_settings
  File "/usr/share/phatch/phatch/core/settings.py", line 23, in <module>
    from pil import IMAGE_READ_EXTENSIONS
  File "/usr/share/phatch/phatch/core/pil.py", line 39, in <module>
    from lib import openImage
  File "/usr/share/phatch/phatch/lib/openImage.py", line 25, in <module>
    import thumbnail
  File "/usr/share/phatch/phatch/lib/thumbnail.py", line 62, in <module>
    import PngImagePlugin
ImportError: No module named PngImagePlugin

Revision history for this message
Andrea Agnolin (agno94) wrote :

This bug also affect ubuntu 13.04 32bit

uname -p
i686
uname -r
3.8.0-16-generic
lsb_release -r
Release: 13.04

Revision history for this message
KEIII (cashagent) wrote :

It seems link to /usr/lib/python3/dist-packages/PIL/PngImagePlugin.py are broken or missing
If copy or make symlink it to /usr/share/phatch/phatch/lib phatch start correctly

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

Can confirm this. Thanks KEIII, your suggestion works!

Dependencies are also: python-imaging python-imaging-compat

The phatch package has a *MISSING* dependency though: python3-imaging

1.) sudo apt-get install python3-imaging (that's where the PIL folder is located)

And then there's still the broken link/symlink:
2.) sudo cp -ivr /usr/lib/python3/dist-packages/PIL/* /usr/share/phatch/phatch/lib/ (press "n" for No twice!)
(or create a proper symlink)

3.) it works!

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :
Revision history for this message
Axel Howind (axel-dua3) wrote :

Same error with frets on fire:
$ fretsonfire
Traceback (most recent call last):
  File "./FretsOnFire.py", line 45, in <module>
    from GameEngine import GameEngine
  File "/usr/share/games/fretsonfire/game/GameEngine.py", line 34, in <module>
    from Data import Data
  File "/usr/share/games/fretsonfire/game/Data.py", line 23, in <module>
    from Font import Font
  File "/usr/share/games/fretsonfire/game/Font.py", line 27, in <module>
    from Texture import Texture
  File "/usr/share/games/fretsonfire/game/Texture.py", line 30, in <module>
    import PngImagePlugin
ImportError: No module named PngImagePlugin

Revision history for this message
CANTE Pierre (pierrecante) wrote :
Download full text (3.1 KiB)

Hi !
I get this, with phatch, the #3 command lines applied aren't efficient for me :
(phatch can't "recognize" any picture)
~$ phatch
Traceback (most recent call last):
  File "/usr/share/phatch/phatch/lib/pyWx/folderFileBrowser.py", line 246, in on_list_item_selected
    self.show_preview(filename)
  File "/usr/share/phatch/phatch/lib/pyWx/folderFileBrowser.py", line 236, in show_preview
    bitmap = pil_wxBitmap(open_thumb(filename, size=(128,128)))
  File "/usr/share/phatch/phatch/lib/openImage.py", line 94, in open_thumb
    save_cache=save_cache)
  File "/usr/share/phatch/phatch/lib/thumbnail.py", line 428, in open
    size=size, save_cache=save_cache)
  File "/usr/share/phatch/phatch/lib/thumbnail.py", line 206, in _open
    image = open_image(filename)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 87, in open_image_exif_thumb
    return open_image_exif(uri)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 74, in open_image_exif
    return imtools.transpose_exif(open(uri))
  File "/usr/share/phatch/phatch/lib/openImage.py", line 44, in open
    image = open_image_without_pil(uri, WITHOUT_PIL)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 115, in open_image_without_pil
    image = open_method(filename)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 350, in open_xcf
    return open_image_with_command(filename, command, 'xcf2png')
  File "/usr/share/phatch/phatch/lib/openImage.py", line 152, in open_image_with_command
    image = Image.open(temp_file)
  File "/usr/share/phatch/phatch/lib/Image.py", line 2020, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file
Traceback (most recent call last):
  File "/usr/share/phatch/phatch/lib/pyWx/folderFileBrowser.py", line 246, in on_list_item_selected
    self.show_preview(filename)
  File "/usr/share/phatch/phatch/lib/pyWx/folderFileBrowser.py", line 236, in show_preview
    bitmap = pil_wxBitmap(open_thumb(filename, size=(128,128)))
  File "/usr/share/phatch/phatch/lib/openImage.py", line 94, in open_thumb
    save_cache=save_cache)
  File "/usr/share/phatch/phatch/lib/thumbnail.py", line 428, in open
    size=size, save_cache=save_cache)
  File "/usr/share/phatch/phatch/lib/thumbnail.py", line 206, in _open
    image = open_image(filename)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 87, in open_image_exif_thumb
    return open_image_exif(uri)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 74, in open_image_exif
    return imtools.transpose_exif(open(uri))
  File "/usr/share/phatch/phatch/lib/openImage.py", line 44, in open
    image = open_image_without_pil(uri, WITHOUT_PIL)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 115, in open_image_without_pil
    image = open_method(filename)
  File "/usr/share/phatch/phatch/lib/openImage.py", line 350, in open_xcf
    return open_image_with_command(filename, command, 'xcf2png')
  File "/usr/share/phatch/phatch/lib/openImage.py", line 152, in open_image_with_command
    image = Image.open(temp_file)
  File "/usr/share/phatch/phatch/lib/Image.py", line 2020, in open
    raise IOError("cannot identify image file")
IOError: cannot identify imag...

Read more...

Revision history for this message
frell (lee) wrote :

Comment #2 doesn't work for me, phatch refuses to open any files. However on another bug, i did find this which did get it working for the time being;

------

I fixed my local installation of phatch by editing "/usr/share/phatch/phatch/lib/thumbnail.py" and changing "import PngImagePlugin" in line 62, to "from PIL import PngImagePlugin".

Revision history for this message
jibux (jibux) wrote :

Hello,
Same fix for me

$ sudo vim /usr/share/games/fretsonfire/game/Texture.py

in line 30

#import PngImagePlugin
from PIL import PngImagePlugin

thanks

Revision history for this message
Ma Jun (maclin.jun) wrote :

I also encounter the crash problem when start phatch after installing it in Ubuntu Software Center, the #3 comment method is efficient for me.

Revision history for this message
Ma Jun (maclin.jun) wrote :

But when I drag a JPG or PNG picture to phatch, there is an error dialog that shows "Sorry, unable to open these images: ".

Revision history for this message
VChris (vchris1975) wrote :

Same problem here on Ubuntu 13.04 64 bit.
First time Phatch didn't launched.
I've repaired the symlink. After that it started, but it doesn't work at all.
When I try to add jpg files, phatch don't process it. Unable to open images.

Revision history for this message
michel_95 (michel-95) wrote :

I did the patch of Christian Niemeyer (christian-niemeyer) but I've the same error of Ma Jun (maclin.jun) or VChris.

Revision history for this message
Dmitry Mukha (muhhmail) wrote :

I just removed Phatch, performed autoclean and autoremove, deleted /usr/share/phatch. Then re-installed phatch +

editing "/usr/share/phatch/phatch/lib/thumbnail.py" and changing "import PngImagePlugin" in line 62, to "from PIL import PngImagePlugin"

And it works!

Revision history for this message
rollab (rwk-kehrman) wrote :

Thanks Dmitry. It now works for me too.
(AMD Quad Ubuntu 13.04)

Revision history for this message
VChris (vchris1975) wrote :

It works for me too, this is the solution. Thanks Dmitry!

Revision history for this message
Abdel Bolanos Martinez (abdel-bolanos) wrote :

I works !!! with Christian Niemeyer comment on 13.04

https://bugs.launchpad.net/phatch/+bug/1156583/comments/3

Revision history for this message
julian porta (julian-porta) wrote :

Same issue on a 13.04 clean install, I confirm https://bugs.launchpad.net/phatch/+bug/1156583/comments/3 works.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.