on ubuntu 16.04, phatch freezes at startup

Bug #1567827 reported by Richard Quy on 2016-04-08
128
This bug affects 29 people
Affects Status Importance Assigned to Milestone
phatch (Debian)
Fix Released
Unknown
phatch (Ubuntu)
Undecided
Unassigned

Bug Description

~$ phatch
/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 746, in fromstring
    "Please call frombytes() instead.")
Exception: fromstring() has been removed. Please call frombytes() instead.

Launchpad Janitor (janitor) wrote :

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

Changed in phatch (Ubuntu):
status: New → Confirmed
StMaus (stmaus-comcast) wrote :

I get as far as a successful decrypt message and the startup screen freezes. This happened when I tried to upgrade from Trusty and also after being forced to do a standard install and loading all previous personal data and applications.

cpesc (cpesc-free) wrote :

a new icon appears on desktop each time you want start phatch,
 all icons stays but the program never starts correctly.

Pablo Vigo (pvigo) wrote :

Solved!

Workaround: Modify "tostring" for "tobytes" and "fromstring" for "frombytes" in the file /usr/share/phatch/phatch/lib/pyWx/wxPil.py

27c27
< wx_image.SetData(image.convert("RGB").tostring())
---
> wx_image.SetData(image.convert("RGB").tobytes())
30c30
< image.convert("RGBA").split()[-1].tostring())
---
> image.convert("RGBA").split()[-1].tobytes())
34c34
< data = new_image.tostring()
---
> data = new_image.tobytes()
46c46
< image.fromstring(wx_image.GetData())
---
> image.frombytes(wx_image.GetData())
50c50
< alpha.fromstring(wx_alpha)
---
> alpha.frombytes(wx_alpha)

Thanks to Francesc Busquets
https://launchpad.net/~francesc.busquets

The attachment "phatch.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
bigblackcar (pmioni) wrote :

I confirm that the patch worked for me too.

chr (chr-dbedia) wrote :

Same issue on Ubuntu 16.04 here, also @pvigo's fix solved it for me.

bill (bill-zannoni) wrote :

Same here, Ubuntu 16.04, @pvigo's fix worked.

Gio (ubuntu.gio) wrote :

+1, same problem and the patch provides by @pvigo works for me.
Thanks !

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package phatch - 0.2.7.1-4

---------------
phatch (0.2.7.1-4) unstable; urgency=medium

  [ Mateusz Łukasik ]
  * debian/patches:
    + Add fix-loading.patch to fix load with latest version of python-imaging
    and python-pil. (Closes: #811184, LP: #1567827)
  * Drop debian/phatch.menu
  * debian/control:
    + Use secured links for VCS.
    + Bump Standards-Version to 3.9.8. (no changes needed)
  * Drop debian/phatch.lintian: it is useless.

 -- Piotr Ożarowski <email address hidden> Wed, 17 Aug 2016 20:44:12 +0200

Changed in phatch (Ubuntu):
status: Confirmed → Fix Released
Doctor Rover (doctor-rover) wrote :

Is the fix planned to be released in 16.04 LTS?

Chris (f-me-y) wrote :

Had the same Problem on 16.04 LTS - @pvigo's patch fixed it! Thanks!

Christian González (droetker) wrote :

Installing phatch and phatch-cli from 16.10 (0.2.7.1-4) on 16.04 works perfectly here. Backporting shouldn't be a problem.

Hans Joachim Desserud (hjd) wrote :

In order to get a fix in Ubuntu 16.04, please perform as much as possible of the SRU Procedure [1] to bring the need to a developer's attention. Looks like the attached patch would be a good candidate for an SRU.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

tags: added: xenial
Changed in phatch (Debian):
status: Unknown → Fix Released
EDEMPCO (edemco) wrote :

I'm offering this as a helpful comment:

This problem with Phatch still not fixed in 16.04LTS as of 01/06/17. That's a problem for the majority of Ubuntu users, many of whom do not like code; do not like to use Terminal; and who want a stable, sound, and functioning OS that has been promised by the designation "LTS". For those of us who want an LTS like that AND run into problems like Phatch, it would be nice to have a single URL page for 16.04LTS FIXES. That page should provide us with the most correct and effective link to FIX problems with the OS and any sanctioned application. In this case the link should have gone to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811184#12 and the credit given to Magnus Berg on Mon, 22 Feb 2016 18:50:26 +0100 who was the first to supply the FIX for Phatch.

Download full text (4.1 KiB)

Well is this really useful?

Sure it would be nice if every bug in ever app was instantly fixed,
distributed and installed in a manner which involved no user skill.

However, the whole LINUX environment is not funded by some multi-billion
dollar corporation intent on taking control of the user computing
environment. If it were then who would control it? Who would fund it? What
is the business case? Good bye control, off to the cloud.

Finally, do we (LINUX users) really want a user base that can not use a
terminal and / or do simple edits on files?

The planet is littered with large scale corporate computing environments
where, near computer illiterate, users demand as some sort of right idiot
proof environments which somehow do everything they want regardless of how
ill-defined or stupid it is.

It takes about 1 minute to install this bug fix.

On Sat, Jan 7, 2017 at 8:09 AM, EDEMPCO <email address hidden> wrote:

> I'm offering this as a helpful comment:
>
> This problem with Phatch still not fixed in 16.04LTS as of 01/06/17.
> That's a problem for the majority of Ubuntu users, many of whom do not
> like code; do not like to use Terminal; and who want a stable, sound,
> and functioning OS that has been promised by the designation "LTS". For
> those of us who want an LTS like that AND run into problems like Phatch,
> it would be nice to have a single URL page for 16.04LTS FIXES. That page
> should provide us with the most correct and effective link to FIX
> problems with the OS and any sanctioned application. In this case the
> link should have gone to https://bugs.debian.org/cgi-
> bin/bugreport.cgi?bug=811184#12 and the credit given to Magnus Berg on
> Mon, 22 Feb 2016 18:50:26 +0100 who was the first to supply the FIX for
> Phatch.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1567827
>
> Title:
> on ubuntu 16.04, phatch freezes at startup
>
> Status in phatch package in Ubuntu:
> Fix Released
> Status in phatch package in Debian:
> Fix Released
>
> Bug description:
> ~$ phatch
> /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", lin...

Read more...

Confusatron (sk04wrx) wrote :

For those (like me) who aren't familiar with applying a diff/patch, the command line context is:

sudo patch /usr/share/phatch/phatch/lib/pyWx/wxPil.py < phatch.diff

kkprro (kkprro) wrote :

Same problem in MATE Desktop Environment 1.16.2 and the patch provides by @pvigo works for me, applied with the command line from skO4wrx.

Thanks!!

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

Other bug subscribers

Remote bug watches

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