Can't open settings for Qube

When I try to open the settings for one of my templates and its AppVMs, I get the error shown in the below image. The text given under “Show Details” is also below. This does not happen in any other templates or AppVMs. I think it may be relevant that I recently added a custom Desktop Entry into /usr/share/applications and its binary to /usr/local/bin, but I removed them and the error still occurs. How do I solve this?

QubesManagerError

----
line: raise CalledProcessError(retcode, process.args,
func: run
line no.: 516
file: /usr/lib64/python3.8/subprocess.py
----
line: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
func: check_output
line no.: 415
file: /usr/lib64/python3.8/subprocess.py
----
line: for line in subprocess.check_output(
func: fill_apps_list
line no.: 94
file: /usr/lib/python3.8/site-packages/qubesmanager/appmenu_select.py
----
line: self.fill_apps_list(template=None)
func: __init__
line no.: 61
file: /usr/lib/python3.8/site-packages/qubesmanager/appmenu_select.py
----
line: self.app_list_manager = AppmenuSelectManager(self.vm, self.app_list)
func: __init__
line no.: 223
file: /usr/lib/python3.8/site-packages/qubesmanager/settings.py
----
line: window = window_class(qt_app, qubes_app)
func: run_synchronous
line no.: 558
file: /usr/lib/python3.8/site-packages/qubesmanager/utils.py
----
line: utils.run_synchronous(functools.partial(VMSettingsWindow, vm, args.tab))
func: main
line no.: 1502
file: /usr/lib/python3.8/site-packages/qubesmanager/settings.py
----
line: load_entry_point('qubesmanager==4.1.23', 'console_scripts', 'qubes-vm-settings')()
func: <module>
line no.: 11
file: /usr/bin/qubes-vm-settings

write “man qvm-appmenus” in dom0 terminal and read the manpage. Then remove all appmenu entries by using commands you read in manpage, and create it again. If you use testing on unstable repository branch in dom0, it may not solve you problem, so you need to backup all VMs before recreating appmenus.

Thanks. It seems to have been a problem with some old files in dom0, they were empty and qvm-appmenus --get-available didn’t like that. I fixed by removing the offending entries in dom0:

[user@dom0 ~]$ rm ~/.local/share/qubes-appmenus/<template>/apps.templates/<application>.desktop

And then I was able to open the qube’s settings and refresh its applications.