Fix Exception: fromstring has been removed in Phatch

Share this post to your friends !
  • 1

DanieBlog - Phatch is a free software for image processing. I usually use it to add text to images. Today when I upgraded my computer to Mint 18.3, I encountered an error opening Phatch. Exception: fromstring () has been removed. Please call frombytes () instead.

Error Exception: fromstring () has been removed

First, I open the Phatch in the menu (ie through the GUI) but it just pops up the eye icon and stops there.

fix-exception-fromstring-has-been-removed-in-phatch Fix Exception: fromstring has been removed in Phatch
Exception: fromstring() has been removed. Please call frombytes() instead.

I switched to trying to open Phatch with the command line, and then … log error occurred, no one likes errors log.

/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/ 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/", line 16765, in <lambda>
    lambda event: event.callable(*event.args, ** )
  File "/usr/share/phatch/phatch/pyWx/", line 1218, in show_frame
    frame = Frame(self.filename, None, -1, ct.TITLE)
  File "/usr/share/phatch/phatch/pyWx/", line 327, in __init__
    frame.Frame.__init__(self, *args, **keyw)
  File "/usr/share/phatch/phatch/pyWx/wxGlade/", line 141, in __init__
  File "/usr/share/phatch/phatch/pyWx/wxGlade/", line 26, in __init__
    set_dirty   = parent.set_dirty,
  File "/usr/share/phatch/phatch/lib/pyWx/", line 96, in __init__
  File "/usr/share/phatch/phatch/lib/pyWx/", line 111, in CreateImageList
    self._AddFormToImageList(form, icon_size, icon_disabled)
  File "/usr/share/phatch/phatch/lib/pyWx/", line 120, in _AddFormToImageList
    wx_image = pil_wxImage(wxImage_pil(wx_image).resize(icon_size,\
  File "/usr/share/phatch/phatch/lib/pyWx/", line 46, in wxImage_pil
  File "/usr/lib/python2.7/dist-packages/PIL/", line 746, in fromstring
    "Please call frombytes() instead.")
Exception: fromstring() has been removed. Please call frombytes() instead.

Use the patch file to fix

After a while, the bug has been confirmed on the development team’s launchpad and also has a patch file. This helps me get better.

You can read more about this bug at this link.

You run the command below to download the patch file.


Next, you apply the patch file to your computer. Note that this requires the sudo or root privileges to perform.

sudo patch -b /usr/share/phatch/phatch/lib/pyWx/ phatch.diff


With just two simple commands, you can fix errors when you start Phatch on your computer. Actually I have not encountered this error before, only after upgrading to Mint 18.3 to meet. Hope you can solve your problem.

If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.

Share this post to your friends !
  • 1
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

single post bottom banner
«« »»

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.