Opened 4 years ago
Closed 2 years ago
#3303 closed bug (Fixed)
Notification-plugin mailing-bug.
Reported by: | mhertz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.4 |
Component: | Plugin | Version: | 2.0.0 |
Keywords: | Cc: | mail@… |
Description
The notification plugin fails sending mail when downloads finish, when having set everything properly up for such. I tested it with gmail and on the forum another user tested it with yahoo and gmail with same result. We both have the same log elements. Thanks in advance. -Martin.
21:42:41 [DEBUG ][deluge_notifications.common :52 ] Calling CORE custom email providers for TorrentFinishedEvent: ('0f2a3adfe82e1c92b390cdcaaec3cdc0dd3ebfd7',) {} 21:42:41 [DEBUG ][deluge_notifications.common :56 ] Found handler for kind email: <bound method CoreNotifications._on_torrent_finished_event of <deluge_notifications.core.Core object at 0x7febbf7cadd0>> 21:42:41 [DEBUG ][deluge_notifications.core :177 ] Handler for TorrentFinishedEvent called for CORE 21:42:41 [DEBUG ][deluge_notifications.common :116 ] Notification failure using email: [Failure instance: Traceback: <class 'KeyError'>: 'name' /usr/lib/python3.7/site-packages/deluge/core/torrentmanager.py:1296:on_alert_torrent_finished /usr/lib/python3.7/site-packages/deluge/core/eventmanager.py:37:emit /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/common.py:70:wrapper /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/common.py:58:_handle_custom_providers --- <exception caught here> --- /usr/lib/python3.7/site-packages/twisted/internet/defer.py:151:maybeDeferred /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/core.py:181:_on_torrent_finished_event ] 21:42:41 [CRITICAL][twisted :154 ] Unhandled error in Deferred: 21:42:41 [CRITICAL][twisted :154 ] Unhandled error in Deferred: 21:42:41 [CRITICAL][deluge.log :93 ] twisted.internet.defer [Failure instance: Traceback: <class 'KeyError'>: 'name' /usr/lib/python3.7/site-packages/deluge/core/torrentmanager.py:1296:on_alert_torrent_finished /usr/lib/python3.7/site-packages/deluge/core/eventmanager.py:37:emit /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/common.py:70:wrapper /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/common.py:58:_handle_custom_providers --- <exception caught here> --- /usr/lib/python3.7/site-packages/twisted/internet/defer.py:151:maybeDeferred /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/core.py:181:_on_torrent_finished_event ] 21:42:41 [CRITICAL][deluge.log :93 ] twisted.internet.defer [Failure instance: Traceback: <class 'KeyError'>: 'name' /usr/lib/python3.7/site-packages/deluge/core/torrentmanager.py:1296:on_alert_torrent_finished /usr/lib/python3.7/site-packages/deluge/core/eventmanager.py:37:emit /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/common.py:70:wrapper /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/common.py:58:_handle_custom_providers --- <exception caught here> --- /usr/lib/python3.7/site-packages/twisted/internet/defer.py:151:maybeDeferred /usr/lib/python3.7/site-packages/deluge/plugins/Notifications-0.3-py3.7.egg/deluge_notifications/core.py:181:_on_torrent_finished_event ] 21:42:41 [DEBUG ][deluge_notifications.common :52 ] Calling CORE custom blink providers for TorrentFinishedEvent: ('0f2a3adfe82e1c92b390cdcaaec3cdc0dd3ebfd7',) {} 21:42:41 [DEBUG ][deluge_notifications.common :52 ] Calling CORE custom sound providers for TorrentFinishedEvent: ('0f2a3adfe82e1c92b390cdcaaec3cdc0dd3ebfd7',) {} 21:42:41 [DEBUG ][deluge_notifications.common :52 ] Calling CORE custom popup providers for TorrentFinishedEvent: ('0f2a3adfe82e1c92b390cdcaaec3cdc0dd3ebfd7',) {}
Change History (7)
comment:1 Changed 4 years ago by arcticslush
- Cc mail@… added
comment:2 Changed 4 years ago by kevindd992002
Any updates to this?
@arcticslush, have you got any progress?
comment:3 Changed 3 years ago by dakkar
My Python is very rusty, but my best guess is: CoreNotifications._on_torrent_finished_event calls torrent.get_status({}) but the Torrent.get_status method expects a list of field names to return, not a dictionary. Therefore, the dictionary torrent_status is empty, and causes that KeyError.
comment:4 Changed 3 years ago by kevindd992002
I don't get it. Why is notifications not a priority? It's been more than a year! My God.
comment:5 Changed 3 years ago by mhertz
Thanks alot dakkar for your hints, much appreciated! I have workaround'ed the issue, though currently doesn't report num_files anymore and only torrent-name in sent mail. Plugin is uploaded with more info at this forum thread by kevindd992002: https://forum.deluge-torrent.org/viewtopic.php?f=7&t=55458
comment:6 Changed 3 years ago by Cas
- Milestone changed from needs verified to 2.0.4
comment:7 Changed 2 years ago by Cas
- Resolution set to Fixed
- Status changed from new to closed
Deployed fix to develop: [e38f1173cf470]
I've run into the same problem. For reference, here are my version numbers:
I believe I've managed to isolate where the bug is coming from and will be working on a patch to address it. Will update with my findings once I know more.