{{{ #!python
20:03:48.549 [INFO ][deluge.core.torrent :64 ] Adding any
new trackers to torrent (7a95c54468a18811d641325d494f7ec7760e0e01) already
in session...
20:03:48.550 [WARNING ][deluge.core.core :67 ] Error when
adding torrent: Torrent already in session
(7a95c54468a18811d641325d494f7ec7760e0e01).
20:03:48.550 [WARNING ][deluge.core.rpcserver :67 ] Error
occurred when sending message: type <class 'deluge.error.AddTorrentError'>
not handled.
20:03:48.550 [ERROR ][deluge.core.rpcserver :72 ] type <class
'deluge.error.AddTorrentError'> not handled
Traceback (most recent call last):
File "C:\develops\python\deluge\deluge\core\rpcserver.py", line 155, in
sendData
self.transfer_message(data)
File "C:\develops\python\deluge\deluge\transfer.py", line 53, in
transfer_message
body = zlib.compress(rencode.dumps(data))
File "rencode/rencode.pyx", line 336, in rencode._rencode.dumps
File "rencode/rencode.pyx", line 316, in rencode._rencode.encode
File "rencode/rencode.pyx", line 249, in rencode._rencode.encode_list
File "rencode/rencode.pyx", line 316, in rencode._rencode.encode
File "rencode/rencode.pyx", line 249, in rencode._rencode.encode_list
File "rencode/rencode.pyx", line 322, in rencode._rencode.encode
Exception: type <class 'deluge.error.AddTorrentError'> not handled
20:03:48.551 [WARNING ][deluge.core.rpcserver :67 ] An exception
occurred while sending RPC_ERROR to client. Wrapping it and resending.
Error to send(causing exception goes next):
Traceback (most recent call last):
File "C:\develops\python\deluge\deluge\core\rpcserver.py", line 335, in
on_success
self.sendData((RPC_RESPONSE, request_id, result))
File "C:\develops\python\deluge\deluge\core\rpcserver.py", line 155, in
sendData
self.transfer_message(data)
File "C:\develops\python\deluge\deluge\transfer.py", line 53, in
transfer_message
body = zlib.compress(rencode.dumps(data))
File "rencode/rencode.pyx", line 336, in rencode._rencode.dumps
File "rencode/rencode.pyx", line 316, in rencode._rencode.encode
File "rencode/rencode.pyx", line 249, in rencode._rencode.encode_list
File "rencode/rencode.pyx", line 316, in rencode._rencode.encode
File "rencode/rencode.pyx", line 249, in rencode._rencode.encode_list
File "rencode/rencode.pyx", line 322, in rencode._rencode.encode
Exception: type <class 'deluge.error.AddTorrentError'> not handled
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3507>
Deluge <https://deluge-torrent.org/>
Deluge Project
Comment (by gazpachoking):
Looked in to this a bit, this seems like the problem: The
'core.add_torrent_files' method never fails, it returns a list, which
contains an Exception for each attempted torrent add, (if any Exceptions
occurred.) When transmitting a success result over RPC, only basic data
types that rencode can handle are able to be sent, so a list of Exceptions
causes the above issue.
Not really sure what the best answer for this is.
- We could make the exception rebuilding like we do in the failure
callback work for any Exceptions being sent.
- We could just raise the error, but that's not a great answer, because
some torrents were possibly added successfully, and there might be more
than one error for torrents that weren't added successfully.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3507#comment:1>
Comment (by DjLegolas):
In addition, the whole purpose of #3320 is to stop printing the traceback
when `AddTorrentError` was raised...[[br]]
Or even, not raise an exception at all.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3507#comment:2>