Ubuntu 20.04 / python issue with ngettext

General support for problems installing or using Deluge
amacieli
New User
New User
Posts: 1
Joined: Mon May 04, 2020 8:45 pm

Ubuntu 20.04 / python issue with ngettext

Postby amacieli » Mon May 04, 2020 8:59 pm

Hi - I upgraded an clean 18.04 ubuntu install to 20.04. After installing deluged and deluge-web, I am having issues starting deluge-web, with the error message below generated by systemctl status deluge-webui:

Code: Select all

May 04 12:33:01 testvm systemd[1]: Started Deluge Bittorrent Client Web Interface.
May 04 12:33:01 testvm deluge-web[2128]: Unable to initialize gettext/locale!
May 04 12:33:01 testvm deluge-web[2128]: 'ngettext'
May 04 12:33:01 testvm deluge-web[2128]: Traceback (most recent call last):
May 04 12:33:01 testvm deluge-web[2128]:   File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 118, in setup_translat>
May 04 12:33:01 testvm deluge-web[2128]:     builtins.__dict__['_n'] = builtins.__dict__['ngettext']
May 04 12:33:01 testvm deluge-web[2128]: KeyError: 'ngettext'


Versions:
(apt list deluge*) deluge-web/focal,focal,now 2.0.3-2 all [installed]
(python3 -V) Python 3.8.2

Is this a bug in the latest deluge-web version, or a bug in my distribution upgrade?

Cheers,

mhertz
Compulsive Poster
Compulsive Poster
Posts: 798
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Ubuntu 20.04 / python issue with ngettext

Postby mhertz » Tue May 05, 2020 12:43 am

It's an issue that isnt really important of deluge 2.0.3 with py38. To fix, you can ask your distro package maintainer to backport this fix from deluge development branch: https://git.deluge-torrent.org/deluge/c ... 94017e7c85

You can also apply it manually in your local install if wanted, as just need adding two extra characters simply, to a single file, as per commit details above. Smarter probably, as gets overwritten on updates, would be to add an systemd override file, adding 2> /dev/null after the starting of daemon, and for deluge-console, you could add a shell-script named deluge-console in your user bin dir, which needs being added infront of PATH and not after, but which usually is done anyways like that, and then in that add '/usr/bin/deluge-console "$@" 2>dev/null', or simply add that line as alias or shell-function to your bashrc/zshrc, but again, the error can be avoided simply as not important. The preceding tips is from memory, which I did before patch to fix this was added to arch-linux deluge package, and later added upstream to deluge development branch, so sorry if anything wrong in that command as from top of head.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests