Open Ygarr opened 6 years ago
What is the output of the locale
command on your system?
There is probably a .desktop file with an invalid character in its filename somewhere in your system.
locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
Can you try applying this patch and see if it outputs anything to stderr?
diff --git a/src/xdgmenumaker b/src/xdgmenumaker
index ba5a037..90fe5f0 100755
--- a/src/xdgmenumaker
+++ b/src/xdgmenumaker
@@ -355,9 +355,13 @@ def remove_command_keys(command, desktopfile, icon):
# location of the desktop file as either a URI (if for example gotten from
# the vfolder system) or a local filename or empty if no location is
# known."
- command = command.replace('"%k"', desktopfile)
- command = command.replace("'%k'", desktopfile)
- command = command.replace('%k', desktopfile)
+ try:
+ command = command.replace('"%k"', desktopfile)
+ command = command.replace("'%k'", desktopfile)
+ command = command.replace('%k', desktopfile)
+ except UnicodeDecodeError:
+ print("ERROR: UnicodeDecodeError while reading {}".format(desktopfile),
+ file=sys.stderr)
# removing any remaining keys from the command. That can potentially remove
# any other trailing options after the keys,
command = command.partition('%')[0]
Then got: