methods tostring() and fromstring() deprecated

Bug #1707917 reported by Johannes Benoit on 2017-08-01
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

starting phatch in ubuntu16 causes a pythontraceback see below:

benoitj@motte:~$ phatch
/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)in
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.

the problem is easys to fix:
replace fromstring() in frombytes() and tostring() in tobytes() in the file usr/share/phatch/phatch/lib/pyWx/

draco (draco31-fr) wrote :

Thanks to Johannes Benoit, here is the patch file to fix the bug.

To apply the patch use the commande :
sudo patch -u /usr/share/phatch/phatch/lib/pyWx/

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

Other bug subscribers