Bug 1290632 - xception: tostring() has been removed. Please call tobytes() instead.
Summary: xception: tostring() has been removed. Please call tobytes() instead.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: comix
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-11 00:45 UTC by David Shea
Modified: 2015-12-25 00:27 UTC (History)
1 user (show)

Fixed In Version: comix-4.0.4-9.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-25 00:27:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Shea 2015-12-11 00:45:28 UTC
Description of problem:

There is a traceback due a change in PIL that is causing the thumbnails to not be displayed. Here's the whole thing:

Traceback (most recent call last):
  File "/usr/share/comix/src/thumbbar.py", line 126, in _load
    _add_page_number(pixbuf, i)
  File "/usr/share/comix/src/thumbbar.py", line 201, in _add_page_number
    num_pixbuf = image.pil_to_pixbuf(im)
  File "/usr/share/comix/src/image.py", line 172, in pil_to_pixbuf
    imagestr = image.tostring()
  File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 686, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.



Version-Release number of selected component (if applicable):
comix-4.0.4-8.fc23.1.noarch


Seems to work fine if you just patch image.py with:

diff -purN comix-4.0.4.orig/src/image.py comix-4.0.4/src/image.py
--- comix-4.0.4.orig/src/image.py	2015-12-10 19:42:53.740805488 -0500
+++ comix-4.0.4/src/image.py	2015-12-10 19:43:17.793817018 -0500
@@ -169,7 +169,7 @@ def get_most_common_edge_colour(pixbuf):
 
 def pil_to_pixbuf(image):
     """Return a pixbuf created from the PIL <image>."""
-    imagestr = image.tostring()
+    imagestr = image.tobytes()
     IS_RGBA = image.mode == 'RGBA'
     return gtk.gdk.pixbuf_new_from_data(imagestr, gtk.gdk.COLORSPACE_RGB,
         IS_RGBA, 8, image.size[0], image.size[1],

Comment 1 Mamoru TASAKA 2015-12-11 00:54:57 UTC
*When* did this change occur? After F-23 alpha? If so, I think python-pillow change must be reverted.

Comment 2 Fedora Update System 2015-12-11 06:54:13 UTC
comix-4.0.4-9.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-f0fd9c8ee5

Comment 3 Mamoru TASAKA 2015-12-11 06:55:37 UTC
Anyway patch applied, thank you.

Comment 4 Fedora Update System 2015-12-12 03:23:30 UTC
comix-4.0.4-9.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update comix'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f0fd9c8ee5

Comment 5 Fedora Update System 2015-12-25 00:27:27 UTC
comix-4.0.4-9.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.