Neither Dropplet nor Inspect will accept images. No reaction what so ever

Bug #1527314 reported by Set Hallstrom on 2015-12-17
52
This bug affects 11 people
Affects Status Importance Assigned to Milestone
phatch (Debian)
Fix Released
Unknown
phatch (Ubuntu)
Medium
Unassigned

Bug Description

Opening phatch image processor gives a floating droplet that will not react on any pictures dropped to it.
Starting phatch from terminal with verbose:

~$ phatch -v
| /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py:8196: GtkWarning: gtk_disable_setlocale() must be called before gtk_init()
| return _core_.PyApp__BootstrapApp(*args, **kwargs)
| Traceback (most recent call last):
| File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16765, in <lambda>
| lambda event: event.callable(*event.args, **event.kw) )
| File "/usr/share/phatch/phatch/pyWx/gui.py", line 1218, in show_frame
| frame = Frame(self.filename, None, -1, ct.TITLE)
| File "/usr/share/phatch/phatch/pyWx/gui.py", line 327, in __init__
| frame.Frame.__init__(self, *args, **keyw)
| File "/usr/share/phatch/phatch/pyWx/wxGlade/frame.py", line 141, in __init__
| self.tree = Tree(self, -1, style=wx.TR_HAS_BUTTONS|wx.TR_NO_LINES|wx.TR_FULL_ROW_HIGHLIGHT|wx.TR_HIDE_ROOT|wx.TR_DEFAULT_STYLE|wx.SUNKEN_BORDER)
| File "/usr/share/phatch/phatch/pyWx/wxGlade/frame.py", line 26, in __init__
| set_dirty = parent.set_dirty,
| File "/usr/share/phatch/phatch/lib/pyWx/treeEdit.py", line 96, in __init__
| self.CreateImageList(icon_size)
| File "/usr/share/phatch/phatch/lib/pyWx/treeEdit.py", line 111, in CreateImageList
| self._AddFormToImageList(form, icon_size, icon_disabled)
| File "/usr/share/phatch/phatch/lib/pyWx/treeEdit.py", line 120, in _AddFormToImageList
| wx_image = pil_wxImage(wxImage_pil(wx_image).resize(icon_size,\
| File "/usr/share/phatch/phatch/lib/pyWx/wxPil.py", line 46, in wxImage_pil
| image.fromstring(wx_image.GetData())
| File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 737, in fromstring
| "Please call frombytes() instead.")
| Exception: fromstring() has been removed. Please call frombytes() instead.

Dropping images on it:

| Traceback (most recent call last):
| File "/usr/share/phatch/phatch/lib/pyWx/droplet.py", line 43, in OnDropFiles
| self.method(fix_paths(filenames), x, y)
| TypeError: 'NoneType' object is not callable

Opening phatch inspector with verbose:

| ~$ phatch -v --inspect
| /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py:8196: GtkWarning: gtk_disable_setlocale() must be called before gtk_init()
| return _core_.PyApp__BootstrapApp(*args, **kwargs)
| /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py:11496: GtkWarning: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed
| return _core_.Window_Layout(*args, **kwargs)

Drag&dropping image on it:

| Traceback (most recent call last):
| File "/usr/share/phatch/phatch/lib/pyWx/droplet.py", line 43, in OnDropFiles
| self.method(fix_paths(filenames), x, y)
| File "/usr/share/phatch/phatch/lib/pyWx/imageInspector.py", line 421, in OnDrop
| self.OpenImages(filenames)
| File "/usr/share/phatch/phatch/lib/pyWx/imageInspector.py", line 820, in OpenImages
| super(OpenMixin, self).OpenImages(filenames)
| File "/usr/share/phatch/phatch/lib/pyWx/imageInspector.py", line 760, in OpenImages
| self.UpdateThumbs()
| File "/usr/share/phatch/phatch/lib/pyWx/imageInspector.py", line 339, in UpdateThumbs
| image.thumb_wx = wxPil.pil_wxBitmap(image.thumb)
| File "/usr/share/phatch/phatch/lib/pyWx/wxPil.py", line 40, in pil_wxBitmap
| return wx.BitmapFromImage(pil_wxImage(image))
| File "/usr/share/phatch/phatch/lib/pyWx/wxPil.py", line 34, in pil_wxImage
| data = new_image.tostring()
| File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 686, in tostring
| "Please call tobytes() instead.")
| Exception: tostring() has been removed. Please call tobytes() instead.

Set Hallstrom (sakrecoer) wrote :

further tests have shown that the console version is functional, but needs "actions" written in python.

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1527314

tags: added: iso-testing
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phatch (Ubuntu):
status: New → Confirmed
Changed in phatch (Debian):
status: Unknown → New
Changed in phatch (Ubuntu):
importance: Undecided → Medium
Sergio Scabuzzo (earthshaper) wrote :

The advice at the following link fixed it for me.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811184#12

Basically:

In the file usr/share/phatch/phatch/lib/pyWx/wxPil.py I changed the
words "fromstring" and "tostring" to "frombytes" and "tobytes". Now
Phatch seems to work with the latest python-imaging and python-pil
libraries in Sid.

florin (florin-arjocu) wrote :

Sergio Scabuzzo's solution seems to be working. Just tested and my batch processing worked. Please update in the repository for latest 16.04 Ubuntu.

CANTE Pierre (pierrecante) wrote :

Yes ! phatch is working now again. I changed the file usr/share/phatch/phatch/lib/pyWx/wxPil.py
like described by Magnus Berg in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811184#12

florin (florin-arjocu) wrote :

Just to make sure others make it, the link @Sergio Scabuzzo is a bit misspelled, there is a shash (/) before the path. Use this command to edit the file:
sudo gedit /usr/share/phatch/phatch/lib/pyWx/wxPil.py

Changed in phatch (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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