Xpra: Ticket #609: Invalid encoding?

I get many errors about invalid encoding. Invalid seems to be png and jpeg. But the client/server supports jpeg and png encoding. Why is it invalid? Also when I use webp or h264 these messages appear.

2014-07-02 11:14:26,673 error processing draw packet
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/client/ui_client_base.py", line 1756, in _draw_thread_loop
  File "/usr/lib64/python2.7/site-packages/xpra/client/ui_client_base.py", line 1803, in _do_draw
    window.draw_region(x, y, width, height, coding, data, rowstride, packet_sequence, options, [record_decode_time])
  File "/usr/lib64/python2.7/site-packages/xpra/client/client_window_base.py", line 268, in draw_region
    self._backing.draw_region(x, y, width, height, coding, img_data, rowstride, options, callbacks)
  File "/usr/lib64/python2.7/site-packages/xpra/client/window_backing_base.py", line 498, in draw_region
    raise Exception("invalid encoding: %s" % coding)
Exception: invalid encoding: jpeg

I'm on trunk r6870, but I've seen this behavior for some weeks now.

Regards, Mike

Wed, 02 Jul 2014 11:57:08 GMT - Antoine Martin: owner, description changed

Please specify your distro, etc..

Do you have python-pillow installed? (without it, png and jpeg should not be available and the server should not use those encodings - so this looks like a valid bug)

Wed, 02 Jul 2014 12:18:10 GMT - Mike:

Sorry!, python-pillow was not installed on the client. After installing dev-python/pillow-2.4.0 it works.

Distro is gentoo.

Thanks for your quick response.

Wed, 02 Jul 2014 12:18:42 GMT - Mike: status changed; resolution set

Fri, 04 Jul 2014 14:22:55 GMT - Antoine Martin: status changed; resolution deleted

I am re-opening this because until we make pillow mandatory (and maybe we should), the client should work without and should not tell the server to use encodings it cannot handle.

Fri, 18 Jul 2014 13:57:05 GMT - Antoine Martin:

This was a bug, fixed in r6904: we can still paint png and jpeg on the client without having PIL installed (though this is not optimal) by using gdk pixbuf. Problem was that we relied on the PIL codepath... and so we failed.

There is another problem when we start the server without PIL:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 642, in expire_delayed_region
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 731, in may_send_delayed
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 740, in do_send_delayed
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 754, in send_delayed_regions
    self.do_send_delayed_regions(damage_time, window, regions, coding, options)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_video_source.py", line 352, in do_send_delayed_regions
    WindowSource.do_send_delayed_regions(self, damage_time, window, regions, coding, options)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 787, in do_send_delayed_regions
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 766, in send_full_window_update
    assert actual_encoding is not None

Fri, 18 Jul 2014 15:24:05 GMT - Antoine Martin: status changed; resolution set

The server-side bug is fixed in r6905.

Sat, 23 Jan 2021 05:00:46 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/609