On start Deluge shows the message "Only thin mode is available due to unknown import Error. To use Standalone mode, please see logs for error details."

Bug #1876955 reported by Norbert
74
This bug affects 14 people
Affects Status Importance Assigned to Milestone
deluge (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On start Deluge shows the message "Only thin mode is available due to unknown import Error. To use Standalone mode, please see logs for error details." with question "Continue in Thin Client mode?"

The terminal output is the following:

```
$ deluge-gtk
Unable to initialize gettext/locale!
'ngettext'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 118, in setup_translation
    builtins.__dict__['_n'] = builtins.__dict__['ngettext']
KeyError: 'ngettext'
Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f77188f2730>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: _findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/twisted/internet/defer.py:1418:_inlineCallbacks
/usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critical
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:208:emit
/usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publishToNewObserver
/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call__
/usr/lib/python3.8/logging/__init__.py:1500:log
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 953, in __del__
    log.critical("Unhandled error in Deferred:",
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 270, in critical
    self.emit(LogLevel.critical, format, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 208, in emit
    PythonLoggingObserver.emit(self, event_dict)
  File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 595, in emit
    _publishNew(self._newObserver, eventDict, textFromEventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 154, in publishToNewObserver
    observer(eventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py", line 115, in __call__
    self.logger.log(
  File "/usr/lib/python3.8/logging/__init__.py", line 1500, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: _findCaller() takes from 1 to 2 positional arguments but 3 were given

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 87, in exception
    yield LoggingLoggerClass.exception(self, msg, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1469, in exception
    self.error(msg, *args, exc_info=exc_info, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 79, in error
    yield LoggingLoggerClass.error(self, msg, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1463, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f77188f2730>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/twisted/internet/defer.py:1418:_inlineCallbacks
/usr/lib/python3/dist-packages/twisted/internet/defer.py:962:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.8/logging/__init__.py:1481:critical
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 962, in __del__
    log.failure(format,
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 190, in failure
    self.emit(level, format, log_failure=failure, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 204, in emit
    getattr(LoggingLoggerClass, event_dict['log_level'].name)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1481, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

```

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: deluge-gtk 2.0.3-2
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: MATE
Date: Tue May 5 19:31:37 2020
InstallationDate: Installed on 2020-04-23 (11 days ago)
InstallationMedia: Ubuntu-MATE 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitecture: all
SourcePackage: deluge
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Norbert (nrbrtx) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in deluge (Ubuntu):
status: New → Confirmed
Revision history for this message
AgNitrate (agnitrate) wrote :

Ubuntu 20.04 ships with Python 3.8, which Deluge doesn't seem to play well with. If you update python3 to point to Python 3.7, it should start up fine.

Revision history for this message
Terje (terjehoaas) wrote :

Can you install python3.7 side by side with 3.8?

Revision history for this message
Nicholas Stommel (nstommel) wrote :

Can confirm this exact thing happens to me on Ubuntu 20.04. I can't even run the Deluge application with this bug. This needs to be fixed ASAP.

Revision history for this message
Kain (kain-kain) wrote :
Revision history for this message
ZeroMaster (zeromaster) wrote :

It also affect the geluge-weg client

systemd[1]: Started Deluge Bittorrent Client Web Interface.
deluge-web[8149]: Unable to initialize gettext/locale!
deluge-web[8149]: 'ngettext'
deluge-web[8149]: Traceback (most recent call last):
deluge-web[8149]: File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 118, in setup_translation
deluge-web[8149]: builtins.__dict__['_n'] = builtins.__dict__['ngettext']
deluge-web[8149]: KeyError: 'ngettext'
systemd[1]: deluge-web.service: Succeeded.

I have tried to start it with Python 2 and 3

There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3 2 auto mode
  1 /usr/bin/python2 1 manual mode
  2 /usr/bin/python3 2 manual mode

Python 3 = Python 3.8.2
Python 2 = Python 2.7.18rc1
Ubuntu 20.04.1 LTS
Linux 5.4.0-47-generic

Revision history for this message
cjspizz (f1xx0rz) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.