Deluge error logging generates errors itself

Bug #2000090 reported by Ian
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
deluge (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

$ dpkg -l deluge-gtk
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-===================================================
ii deluge-gtk 2.0.3-3.1 all bittorrent client written in Python/PyGTK (GTK+ ui)

When I try to download a torrent, the listening port "works" and there is a small flurry of activity at the start, but "error" is shown in red on the bottom and although peers/seeds are shown, no data seems to arrive.

There is no obvious way to find out what the error is! None of the in program screens display any helpful indication about what is being complained about.

If I start it with

$ deluge-gtk -L info -l ~/deluge.log

.. then I get this on the command line:

Unhandled error in Deferred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/listview.py", line 304, in load_state
    self.state = load_pickled_state_file(filename)
  File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/common.py", line 345, in load_pickled_state_file
    log.info('Opening %s for load: %s', filename, _filepath)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1905, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1815, in _cancellableInlineCallbacks
    _inlineCallbacks(None, gen, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
    result = current_context.run(gen.send, result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 69, in info
    yield LoggingLoggerClass.info(self, msg, *args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1477, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1612, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: Logging.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 0x7efc065c1300>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: Logging.findCaller() takes from 1 to 2 positional arguments but 3 were given
<frozen importlib._bootstrap_external>:128:_path_join
/usr/lib/python3/dist-packages/twisted/internet/defer.py:344:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:142:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:81:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:90:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.10/logging/__init__.py:1524:critical
/usr/lib/python3.10/logging/__init__.py:1612:_log
]
Traceback (most recent call last):
  File "<frozen importlib._bootstrap_external>", line 128, in _path_join

  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 344, in __del__
    log.failure(format, self.failResult, debugInfo=debugInfo)
  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 142, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 81, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 90, 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.10/logging/__init__.py", line 1524, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1612, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: Logging.findCaller() takes from 1 to 2 positional arguments but 3 were given

Unhandled error in Deferred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/listview.py", line 304, in load_state
    self.state = load_pickled_state_file(filename)
  File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/common.py", line 355, in load_pickled_state_file
    log.info('Successfully loaded %s: %s', filename, _filepath)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1905, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1815, in _cancellableInlineCallbacks
    _inlineCallbacks(None, gen, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
    result = current_context.run(gen.send, result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 69, in info
    yield LoggingLoggerClass.info(self, msg, *args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1477, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1612, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: Logging.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 0x7efc065c1300>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: Logging.findCaller() takes from 1 to 2 positional arguments but 3 were given
<frozen importlib._bootstrap_external>:128:_path_join
/usr/lib/python3/dist-packages/twisted/internet/defer.py:344:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:142:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:81:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:90:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.10/logging/__init__.py:1524:critical
/usr/lib/python3.10/logging/__init__.py:1612:_log
]
Traceback (most recent call last):
  File "<frozen importlib._bootstrap_external>", line 128, in _path_join

  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 344, in __del__
    log.failure(format, self.failResult, debugInfo=debugInfo)
  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 142, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 81, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 90, 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.10/logging/__init__.py", line 1524, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1612, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: Logging.findCaller() takes from 1 to 2 positional arguments but 3 were given

.. repeat ad infinitum with the top line of each traceback varying.

In deluge.log is:

19:22:50 [INFO ][deluge.ui.ui:70 ] Deluge ui 2.0.3
19:22:50 [INFO ][deluge.ui.ui:72 ] Starting gtk ui..
19:22:51 [INFO ][deluge.i18n.util :102 ] Setting up translations from /usr/lib/python3/dist-packages/deluge/i18n
19:22:51 [INFO ][twisted :147 ] Factory starting on '/home/ian/.config/deluge/ipc/deluge-gtk'
19:22:51 [INFO ][twisted :147 ] Starting factory <twisted.internet.protocol.Factory object at 0x7efc00bddd80>
19:22:51 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
[repeated a hundred or so times]
19:24:47 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
19:24:48 [INFO ][twisted :147 ] Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7efbfbca6050>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7efbfbd681c0>)
19:24:48 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
19:24:48 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
19:24:49 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
19:24:49 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
19:24:49 [INFO ][twisted :147 ] Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7efbfbca6050>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7efbfbd681c0>)
19:24:51 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
[repeated a hundred or so times]
19:26:34 [CRITICAL][twisted :147 ] Unhandled error in Deferred:
19:26:34 [INFO ][twisted :147 ] (UNIX Port /home/ian/.config/deluge/ipc/deluge-gtk Closed)
19:26:34 [INFO ][twisted :147 ] Stopping factory <twisted.internet.protocol.Factory object at 0x7efc00bddd80>

The end was probably down to me doing ^C to end the program.

None of that helps me with what the program thinks the error is, and in generating it, it's generated more errors: if I run deluge-gtk without the logging enabled, no errors are shown on the command line. I still see red 'error' in the program.

Ubuntu 22.04, AMD64, Python 3.10.6

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
Cameron Tacklind (cinderblock) wrote :

This version of deluge is out of date. Users have 2 solutions.

1. Manually update source files following this patch: https://git.deluge-torrent.org/deluge/commit/?h=develop&id=351664ec071daa04161577c6a1c949ed0f2c3206

2. Use Deluge's official stable PPA: https://dev.deluge-torrent.org/wiki/Installing/Linux/Ubuntu#AddDelugePPARepository

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.