Opened 3 years ago

Closed 2 years ago

#3469 closed bug (Upstream)

Files can't be moved

Reported by: nop666 Owned by:
Priority: major Milestone: needs verified
Component: libtorrent Version: 2.0.3
Keywords: move_storage Cc:

Description

Ubuntu 21.04, Deluge 2.0.3, libtorrent: 1.2.9.0

Files cannot be moved, either via the "move completed to" setting, or manually via the GUI "Move Download Folder" function. The problem seems to be in in the 'move_storage' function in LibTorrent? 1.2.9, per the fix in 1.2.10: https://github.com/arvidn/libtorrent/releases/tag/libtorrent-1.2.10

It seems to confirm bugs #3458 new bug "move completed to" doesn't work https://dev.deluge-torrent.org/ticket/3458

#3457 new bug "Move Download Folder" does nothing https://dev.deluge-torrent.org/ticket/3457

Note that this problem came up for me after upgrading Ubuntu from 20.10 to 21.04.

I don't want to be a whiner, but this bug is a show-stopper for me, as it means that I can't file any new torrents on my media server. This seems to be a matter of just updating the version of LibTorrent?. Any advice on how I can do that without building from source myself would be gratefully appreciated!

Debug log when attempting to "Move Download Folder": (Cut & paste from xterm, with the 'move_storage' lines highlighted, so any formatting problems are my fault): =============================================================================================== Unhandled error in Deferred: 21:08:04 [CRITICAL][twisted :154 ] Unhandled error in Deferred:

Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 1649, in main

return _Gtk_main(*args, kwargs)

File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/menubar.py", line 368, in on_dialog_response_event

client.core.move_storage(

File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 551, in call

return self.daemon.call(self.base, *args, kwargs)

File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 500, in call

return defer.maybeDeferred(m, *copy.deepcopy(args), copy.deepcopy(kwargs))

--- <exception caught here> ---

File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 151, in maybeDeferred

result = f(*args, kw)

* File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 691, in move_storage * if not self.torrentmanager[torrent_id].move_storage(dest): * File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1248, in move_storage * self.handle.move_storage(dest, flags=2) Boost.Python.ArgumentError?: Python argument types in

torrent_handle.move_storage(torrent_handle, str)

did not match C++ signature:

move_storage(libtorrent::torrent_handle {lvalue}, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > path, libtorrent::move_flags_t flags=libtorrent.move_flags_t.always_replace_files)

Temporarily disabling observer LegacyLogObserverWrapper?(<bound method TwistedLoggingObserver?.emit of <deluge.log.TwistedLoggingObserver? object at 0x7fb2264a1370>>) 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/deluge/ui/gtk3/menubar.py:368:on_dialog_response_event /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.9/logging/init__.py:1493:critical /usr/lib/python3.9/logging/init__.py:1577:_log ] Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/menubar.py", line 368, in on_dialog_response_event

client.core.move_storage(

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_dictlog_level?.name)(

File "/usr/lib/python3.9/logging/init.py", line 1493, in critical

self._log(CRITICAL, msg, args, kwargs)

File "/usr/lib/python3.9/logging/init.py", line 1577, 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 ===============================================================================================

Attachments (1)

DelugeError.log (3.6 KB) - added by nop666 3 years ago.

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by nop666

comment:1 Changed 3 years ago by nop666

Definitely a libtorrent 1.2.9 problem. Updating to libtorrent: 1.2.12.0 fixed the problem for me.

comment:2 Changed 3 years ago by fingers76

Same thing happened to me and it is a huge annoyance. Could you post instructions on how you updated libtorrent to 1.2.12.0?

Aside from that, how would this ordinarily get fixed?

comment:3 follow-up: Changed 3 years ago by nop666

I used a daily build from here: https://launchpad.net/~libtorrent.org You'll need to add the PPA repo.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 2 years ago by Harry089

Replying to nop666:

I used a daily build from here: https://launchpad.net/~libtorrent.org You'll need to add the PPA repo.

Will this work for Raspberry Pi (ubuntu 21.10 server) ?

comment:5 in reply to: ↑ 4 Changed 2 years ago by nop666

Replying to Harry089:

Replying to nop666:

I used a daily build from here: https://launchpad.net/~libtorrent.org You'll need to add the PPA repo.

Will this work for Raspberry Pi (ubuntu 21.10 server) ?

I would assume so. I'm running Ubuntu 21.20 myself. :)

comment:6 Changed 2 years ago by Harry089

for someone who is a noob like me, if you want to update libtorrent:

1- Add the Repo

-sudo add-apt-repository ppa:libtorrent.org/1.2-daily

-sudo apt-get update

2- sudo apt install python3-libtorrent

This will update your libtorrent to the latest.

comment:7 Changed 2 years ago by Cas

  • Resolution set to Upstream
  • Status changed from new to closed

If it helps there is also PyPi install now: https://pypi.org/project/libtorrent/

Note: See TracTickets for help on using tickets.