The error message indicates a locale configuration issue on this particular system, since it fails in when trying to assign a translation to a property.
I cannot guess where, what or why.
Try loading the application
LANG=C menulibre
If that work - may run localectl set-locale <your-locale> e.g. for an english system in Denmark
localectl set-locale en_DK.UTF-8
The configuration file you will be changing is /etc/locale.conf.
Do remember that the given locale must be configured in etc/locale.gen and the locale must have been created by running locale-gen.
The issue may have surfaced if a /etc/locale.gen.pacnew was used to overwrite the existing file.
Many years ago when I volunteered to rewrite pacman-mirrors application I encountered this exact issue.
Python 2 was ASCII and Python 3.x has been defaulting unicode for quite a while - the encoding header (shown below) that was once necessary, is no longer as relevant as it was - in this case - if the developers of menulibre had included the encoding header you may not have seen the issue at all.
# -*- encoding: utf-8 -*-
But, my thought is, due to you having the ASCII locales enabled, Python is chocking on chars which is not in the ASCII charset (256 chars).
The message is well-known and documented with Python language and it is caused by an invalid byte sequence when trying to decode the content.
I have had to deal with unwanted BOMs on numerous occasions.
Why it occurs on one system and not another is impossible to guess, I guess the ASCII locale - it was not them.
I have synced menulibre to one of my test systems and menulibre launch without issues - so now I suspect that one of your desktop files, read by menulibre, is a fault.
Still guessing - it could be a BOM (Byte Order Mark) which may be set as the first character of a file.
Try to recall a situation where you may have edited a .desktop file with an advanced editor. This editor may have added the BOM as the first character and if/when menulibre expects text-only - thus it may break if the BOM exist.
Unless you have edited .desktop files in /usr/share/applications manually then we can rule those out.
Locate any .desktop files in your user’s home folder
find ~/ -name '*.desktop'
Only you know which one you edited.
Open the file using the nano editor - look at the very first character - if it looks weird - like a control character - delete it and save the file.
The reason for crashing is clear - it is a decoding error.
Under which circumstance it occur is unclear.
The traceback provides an idea of what can go wrong.
Since it appears in function that assigns a translated label to an action, it points to the translation files provided for the current UI language.
I don’t know what your primary UI language but since I cannot make it fail on a system with English locale en_DK.UTF-8 - I have to think it is either the de_CH or the fr_CH locale.
Switch locale to en_US
localectl set-locale en_US.UTF-8
Then restart your system and test by launching menulibre from the command line.
Since this the default language for the application expect it to run without issues.
If it fails to run - quite unexpected - then you may have file system errors, affecting the application.
Switch the current locale to de_CH
localectl set-locale de_CH.UTF-8
Then restart your system and test once again
Test the last locale fr_CH
localectl set-locale fr_CH.UTF-8
Restart your system and test one more time
If you can run menulibre using one locale but not another then you have narrowed the issue to that locale’s translation files and - combined with the traceback you provided earlier - is information you can use to open an issue with the developer(s) of menulibre.
Your error message displays - note the highlighted line
The highlighted line contains three (3) characters which is not in the source nor on my system so I am fairly certain those chars is causing the UnicodeDecodeError.
I didn’t recognise it earlier though it has been there all the time
If you ask me how it has happened - I have no idea - a fairly common cause is file system corruption of some sort.
But you could look at the file data - especially Modify and Access properties - my ideas would be guessing
stat /usr/lib/python3.13/site-packages/menulibre/MenulibreApplication.py
On my system line 338..345 in /usr/lib/python3.13/site-packages/menulibre/MenulibreApplication.py read
That was my guess as well, but it is simply because of the editor he used to post this here
(the forum editor - there is a choice between two variants by clicking the leftmost icon).
The initial post shows the same snippet, but differently formatted - those are just three dots.
If there is an issue with that file for some reason, wouldn’t it make sense to uninstall the application, clear the package cache to force a re-download of a fresh copy and then reinstall the application?