xpra icon
Bug tracker and wiki

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#2439 closed defect (fixed)

window_source.py py3 incompatibility

Reported by: Harald Schilly Owned by: Antoine Martin
Priority: major Milestone: 4.0
Component: server Version: 3.0.x
Keywords: Cc:

Description

Hi, I haven't found a ticket for this, sorry if it is a dup. When I open a menu in window, I get this stacktrace in the log:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1450, in expire_delayed_region
    self.may_send_delayed()
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1614, in may_send_delayed
    self.do_send_delayed()
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1625, in do_send_delayed
    self.send_delayed_regions(delayed)
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1643, in send_delayed_regions
    self.do_send_delayed_regions(dr.damage_time, dr.regions, dr.encoding, dr.options)
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_video_source.py", line 737, in do_send_delayed_regions
    WindowSource.do_send_delayed_regions(self, damage_time, regions, coding, options)
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1713, in do_send_delayed_regions
    send_full_window_update("merged region covers almost the whole window")
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1654, in send_full_window_update
    actual_encoding = get_encoding(ww, wh)
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 1651, in get_encoding
    return get_best_encoding(w, h, speed, quality, coding)
  File "/usr/lib/python3/dist-packages/xpra/server/window/window_source.py", line 924, in get_auto_encoding
    return (x for x in co if x!="rgb").next()
AttributeError: 'generator' object has no attribute 'next'

This should be next( ... ) to be compatible with python 3.

Change History (3)

comment:1 Changed 2 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks for reporting this. Fixed in r24102.

Out of curiosity, how did you manage to trigger this?
This fallback option should almost never be used, as most clients will be using webp or jpeg before falling through to this code.

comment:2 Changed 2 months ago by Harald Schilly

This is happening on CoCalc, you can check X11 support to get an idea what it does or try it yourself.

However, I'm wondering about this fall through. Maybe there is actually something missing/a bug in how CoCalc is using this.

comment:3 Changed 2 months ago by Antoine Martin

IIRC, cocalc is using a forked version that lacks a number of improvements made since the fork, probably including some encodings like webp.

Note: See TracTickets for help on using tickets.