Unhandled error in Deferred:

General support for problems installing or using Deluge
Post Reply
SSamiK
New User
New User
Posts: 2
Joined: Sun Jan 24, 2021 1:04 pm

Unhandled error in Deferred:

Post by SSamiK »

So this happend on a fresh install of Linux Mint - I installed Deluge and deluged as per my normal routine.
Set everything up so that it worked.

But there is a couple issues - first of not all torrents shows in the thin client so I had to restart it a few times to get everything to show. Even on the host that runs borth deluge and deluged. Labels would not do "move when completed" as setup.

And all of a sudden deluged just won''t start anymore.
Throws out this bunch of lines:

Code: Select all

Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7fe4b00907f0>>) 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: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 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/common.py", line 1344, in run_profiled
    return func(*args)
  File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 124, in run_daemon
    log.error(
  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 0x7fe4b00907f0>>) 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: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 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

lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.1
Release: 20.1
Codename: ulyssa

deluged --version
deluged 2.0.3
libtorrent: 1.2.12.0
Python: 3.8.5
OS: Linux Linux Mint 20.1 ulyssa

Any ideas what I can do to fix this? Deluge always have been my favorite client so I really don't want to move to something else.
SSamiK
New User
New User
Posts: 2
Joined: Sun Jan 24, 2021 1:04 pm

Re: Unhandled error in Deferred:

Post by SSamiK »

I have not been able to solve this yet, so please if anyone can chime in I would appreciate it much.
I tried purging Deluge and deluged from my system and reinstalling but no change. I admit not having spent a ton of time trying to figure this out, but that's life.. Just cant find the same amount of time to spend on things like this as in younger years.

For the time being I'm checking out rTorrent and Qbit as possible replacements - both lack a thin client, so they might not fill the deluge-gap but they'll have to do for now.
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Unhandled error in Deferred:

Post by shamael »

Any help in this post? viewtopic.php?t=55662
Have you updated the twisted package already?
ross104
New User
New User
Posts: 4
Joined: Wed Jan 20, 2021 4:27 pm

Re: Unhandled error in Deferred:

Post by ross104 »

Upgraded twisted via

Code: Select all

sudo pip3 install --upgrade twisted
Install patch log.py

It helped me, might help you.
mentor
New User
New User
Posts: 2
Joined: Thu Apr 30, 2020 3:48 pm

Re: Unhandled error in Deferred:

Post by mentor »

ross104 wrote:
Install patch log.py

It helped me, might help you.
How does one install a patch? I'm using the ppa:deluge-team/stable ppa.

Just updating twisted did nothing.

Edit: see this reddit thread.
Post Reply