Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
keeakita opened this issue Apr 11, 2016 · 1 comment
Closed

Comments

@keeakita
Copy link

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
Copy link
Owner

spillz commented Apr 11, 2016

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
#14

@spillz spillz closed this as completed Aug 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants