Page 1 of 1

Boost.Python.ArgumentError during move operation

Posted: Fri Sep 11, 2020 4:12 pm
by movalex
Hi!
I use deluge 2.0.3 as a daemon on a mac, and installed libtorrent for python 3.8 from brew.
I receive an error during file move via web-ui
Python argument types in
torrent_handle.move_storage(torrent_handle, str)
did not match C++ signature:

I also tried 2.0.4dev38 and got the same error.
Here's the error message.
It worked previously just fine. What should I look for?


Code: Select all

18:56:47.100 [ERROR   ][deluge.core.rpcserver         :1469] Exception calling RPC request: Python argument types in
    torrent_handle.move_storage(torrent_handle, str)
did not match C++ signature:
    move_storage(libtorrent::torrent_handle {lvalue}, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > path, libtorrent::move_flags_t flags=libtorrent.move_flags_t.always_replace_files)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/deluge/core/torrent.py", line 1250, in move_storage
    self.handle.move_storage(dest.encode('utf8'), flags=2)
Boost.Python.ArgumentError: Python argument types in
    torrent_handle.move_storage(torrent_handle, bytes)
did not match C++ signature:
    move_storage(libtorrent::torrent_handle {lvalue}, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > path, libtorrent::move_flags_t flags=libtorrent.move_flags_t.always_replace_files)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/deluge/core/core.py", line 692, in move_storage
    if not self.torrentmanager[torrent_id].move_storage(dest):
  File "/usr/local/lib/python3.8/site-packages/deluge/core/torrent.py", line 1252, 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::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > path, libtorrent::move_flags_t flags=libtorrent.move_flags_t.always_replace_files)

Re: Boost.Python.ArgumentError during move operation

Posted: Fri Sep 11, 2020 4:53 pm
by mhertz
I can tell you're using libtorrent 1.2.9 with that error, which was a bug in the python bindings affecting non-windows systems and fixed little later in RC_1_2 branch with this commit: https://github.com/arvidn/libtorrent/pull/5093 , now included in latest stable 1.2.10 release.

Either update to latest version, or downgrade to 1.2.8.

Re: Boost.Python.ArgumentError during move operation

Posted: Fri Sep 11, 2020 5:20 pm
by movalex
Wow, that was fast. Thanks, I'll try to upgrade.