spillz / picty

picty helps you manage photos
57 stars 9 forks source link

Exception: tostring() has been removed. Please call tobytes() instead. #14

Closed keeakita closed 8 years ago

keeakita commented 8 years ago

On Arch Linux, I'm getting the following error immediately followed by the program completely freezing:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/william/tmp/picty/modules/picty/viewer.py", line 158, in _background_task
    imagemanip.size_image(item,self.sizing,False,self.zoom)
  File "/home/william/tmp/picty/modules/picty/imagemanip.py", line 801, in size_image
    item.qview=image_to_pixbuf(qimage)
  File "/home/william/tmp/picty/modules/picty/imagemanip.py", line 733, in image_to_pixbuf
    pixbuf=gtk.gdk.pixbuf_new_from_data(im.tostring(), gtk.gdk.COLORSPACE_RGB, rgba, 8, w, h, w*(3+rgba))
  File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 699, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.

I changed line 733 of picty/modules/picty/imagemanip.py to use tobytes instead of tostring and it appears much more stable (haven't had a freeze yet)

spillz commented 8 years ago

Thanks for reporting. I will make the fix and any others required this week. On Apr 10, 2016 11:26 PM, "William Osler" notifications@github.com wrote:

On Arch Linux, I'm getting the following error immediately followed by the program completely freezing:

Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.__target(_self.args, _self.__kwargs) File "/home/william/tmp/picty/modules/picty/viewer.py", line 158, in _background_task imagemanip.size_image(item,self.sizing,False,self.zoom) File "/home/william/tmp/picty/modules/picty/imagemanip.py", line 801, in size_image item.qview=image_to_pixbuf(qimage) File "/home/william/tmp/picty/modules/picty/imagemanip.py", line 733, in image_to_pixbuf pixbuf=gtk.gdk.pixbuf_new_from_data(im.tostring(), gtk.gdk.COLORSPACE_RGB, rgba, 8, w, h, w(3+rgba)) File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 699, in tostring "Please call tobytes() instead.") Exception: tostring() has been removed. Please call tobytes() instead.

I changed line 733 of picty/modules/picty/imagemanip.py to use tobytes instead of tostring and it appears much more stable (haven't had a freeze yet)

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/spillz/picty/issues/14