xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 13 months ago

Closed 13 months ago

Last modified 8 months ago

#2863 closed defect (fixed)

Bug in pyxdg throws error when a client connects

Reported by: Markus Ebner Owned by: Antoine Martin
Priority: major Milestone: 4.1
Component: server Version: 4.0.x
Keywords: shadow, attach, pyxdg Cc:

Description (last modified by Antoine Martin)

xpra shadow :0 --bind-tcp= -d server

throws an error as soon as a client tries to connect when the pyxdg library is installed.

This because of: https://gitlab.freedesktop.org/xdg/pyxdg/-/issues/20

It does not seem that this will be fixed anytime soon, so you may want to catch this (if possible), or temporarily work around this by not attempting to use the library if python is too new.
Verified by uninstalling the python3-pyxdg package. This solved the problem for us.


Error during threaded setup of <class 'xpra.server.mixins.child_command_server.ChildCommandServer'>
Traceback (most recent call last):
File "/usr/lib64/python3.8/site-packages/xpra/server/server_base.py", line 172, in threaded_init
File "/usr/lib64/python3.8/site-packages/xpra/server/mixins/child_command_server.py", line 107, in threaded_setup
File "/usr/lib64/python3.8/site-packages/xpra/platform/xposix/xdg_helper.py", line 233, in load_xdg_menu_data
xdg_menu_data = do_load_xdg_menu_data()
File "/usr/lib64/python3.8/site-packages/xpra/platform/xposix/xdg_helper.py", line 264, in do_load_xdg_menu_data
menu = parse()
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 1128, in parse
return XMLMenuBuilder(debug).parse(filename)
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 632, in parse
menu = self.parse_menu(tree.getroot(), filename)
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 650, in parse_menu
self.parse_node(node, filename, menu)
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 659, in parse_node
menu = self.parse_menu(child, filename)
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 650, in parse_menu
self.parse_node(node, filename, menu)
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 682, in parse_node
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 759, in parse_rule
return Rule(type, tree)
File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 421, in __init__
self.code = compile(self.expression, '<compiled-menu-rule>', 'eval')
ValueError: Name node can't be used with 'True' constant

Attachments (1)

error.zip (14.3 KB) - added by Markus Ebner 13 months ago.
System Information (Bug-Report tool)

Download all attachments as: .zip

Change History (5)

Changed 13 months ago by Markus Ebner

Attachment: error.zip added

System Information (Bug-Report tool)

comment:1 Changed 13 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

This was already fixed in r27118, but seeing how often pyxdg throws new types of errors, I've changed the exception handler to catch all exceptions: r27168.
This is normally frowned upon, but better than suffering yet another pyxdg bug in the future.

comment:2 Changed 12 months ago by Antoine Martin

Description: modified (diff)

There is a viable workaround, launch your server with:

XPRA_EXPORT_XDG_MENU_DATA=0 xpra start ...


xpra start --env=XPRA_EXPORT_XDG_MENU_DATA=0 ...

comment:3 Changed 11 months ago by Antoine Martin

For those unable to upgrade xpra or pyxdg, you can also apply this workaround: Bugfix AttributeError: type is not stored in attribute but calculated by method

comment:4 Changed 8 months ago by migration script

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

Note: See TracTickets for help on using tickets.