I had installed Deluge on Raspbian Buster fine for a few years, then noticed I was getting behind on updates so upgraded to Bookworm, followed the same installation instructions on Deluge Wiki https://deluge-torrent.org/installing/linux/ubuntu/.
But then ran into the "Unable to initialize gettext/locale!" Issue. Deluge still starts, but with errors and does not work properly.
By researching this error, found out I had to update my locale settings, which I had already done, then noticed I had missing the LANGUAGE and LC_ALL fields from it, but created them via the /etc/environment and set them up, now they are complete, but Deluge is still complaining of the same thing.
Complete error:
Code: Select all
nable to initialize gettext/locale!
module 'gettext' has no attribute 'bind_textdomain_codeset'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
18:46:45 [ERROR ][deluge.i18n.util :146 ] Unable to initialize gettext/locale!
18:46:45 [ERROR ][deluge.i18n.util :147 ] module 'gettext' has no attribute 'bind_textdomain_codeset'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
18:46:47 [ERROR ][deluge.i18n.util :146 ] Unable to initialize gettext/locale!
18:46:47 [ERROR ][deluge.i18n.util :147 ] module 'gettext' has no attribute 'bind_textdomain_codeset'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
Code: Select all
LANG=en_US.UTF-8
LANGUAGE=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=en_US.UTF-8
What do you think I'm missing guys? This is a new Bookworm build.