move storage does not work

Bug #1041415 reported by Chad Miller on 2012-08-25
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Deluge
Fix Released
Unknown
deluge (Ubuntu)
Undecided
Unassigned

Bug Description

deluged 1.3.5-1ubuntu1
python-libtorrent 0.16.2-0ubuntu1

The python-libtorrent version appears to be incompatible with this deluged version.

After download, files are never moved to new location, either as programmed to do in settings or in using the Gtk UI to move them.

In core/torrent.py, method move_storage at line 834, there's a silent eating of an exception at the bottom. It can mask this and cause the function to return False, failure:

    Failed to move 5dc08dc499eba379b4bc8e364c6b9d0ff2c7f794 to /data/%downloaded-unsorted. Python argument types in
        torrent_handle.move_storage(torrent_handle, unicode)
    did not match C++ signature:
        move_storage(libtorrent::torrent_handle {lvalue}, std::string)

It is the unicodeification of the parameter to self.handle.move_storage that makes the parameter not match. The comment at the top of the function is worrysome. Unicode should be used internally, but the function signature for boost signature no longer matches.

As a dumb workaround, I had luck with encoding the parameter to UTF-8.

> self.handle.move_storage(dest_u.encode("utf-8"))

Related branches

Chad Miller (cmiller) on 2012-08-25
Changed in deluge (Ubuntu):
status: New → In Progress
assignee: nobody → Chad Miller (cmiller)
Chad Miller (cmiller) on 2012-08-25
Changed in deluge (Ubuntu):
assignee: Chad Miller (cmiller) → nobody
status: In Progress → Confirmed
tags: added: patch
Changed in deluge:
status: Unknown → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package deluge - 1.3.5-1ubuntu2

---------------
deluge (1.3.5-1ubuntu2) quantal; urgency=low

  [Chad Miller]
  * Add patch to fix function parameter on call to libtorrent to move storage.
    It doesn't want Unicode (LP: #1041415).
  * Set minimum version dependency higher to catch new function signature.
  * Fix grammar in control.
 -- Andrew Starr-Bochicchio <email address hidden> Fri, 24 Aug 2012 21:04:04 -0400

Changed in deluge (Ubuntu):
status: Confirmed → Fix Released
Changed in deluge:
status: Confirmed → Fix Released
gogo (trebelnik-stefina) wrote :

I still have this problem in Ubuntu Quantal!

Cas (calumlind) wrote :

@gogo if that is the case then you will need to provide a lot more details on how to reproduce and the error logs.

Changed in deluge:
status: Fix Released → New
Changed in deluge:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.