Folder ops are failing with KeyError

Bug #899305 reported by Natalia Bidart on 2011-12-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
magicicada gui
High
Natalia Bidart

Bug Description

An example of a trace is this one:

Traceback (most recent call last):
  File "/home/nessita/projects/magicicada/remove-folders/magicicada/gui/gtk/listings.py", line 166, in call_backend
    yield operation(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 349, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/home/nessita/projects/magicicada/remove-folders/magicicada/syncdaemon.py", line 504, in _folder_operation
    result = yield operation(value)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 349, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/home/nessita/projects/magicicada/remove-folders/magicicada/dbusiface.py", line 91, in f
    res = yield func(*a, **k)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1020, in _inlineCallbacks
    result = g.send(result)
  File "/home/nessita/projects/magicicada/remove-folders/magicicada/dbusiface.py", line 561, in _folder_operation
    folder = self._get_folder_data(result[0])
KeyError: 0

I've debugged a bit and result is a dict like this one:

dbus.Dictionary({dbus.String(u'subscribed'): dbus.String(u'True'), dbus.String(u'suggested_path'): dbus.String(u'~/foo'), dbus.String(u'generation'): dbus.String(u''), dbus.String(u'node_id'): dbus.String(u'185d2555-708e-42f4-af3b-d2668bdb55c8'), dbus.String(u'volume_id'): dbus.String(u'8ee2cbf1-5698-4f79-a0fc-6c7bbb380afe'), dbus.String(u'path'): dbus.String(u'/home/nessita/foo'), dbus.String(u'type'): dbus.String(u'UDF')}, signature=dbus.Signature('ss'))

So I checked that the following diff fixes this issue:

=== modified file 'magicicada/dbusiface.py'
--- magicicada/dbusiface.py 2011-11-19 17:14:50 +0000
+++ magicicada/dbusiface.py 2011-12-02 18:07:32 +0000
@@ -558,7 +558,7 @@
             raise FolderOperationError(**kwargs)
         else:
             logger.debug("%s folder finished ok: %s", act_name, result)
- folder = self._get_folder_data(result[0])
+ folder = self._get_folder_data(result)
             defer.returnValue(folder)

     def create_folder(self, path):

Related branches

Changed in magicicada:
status: New → Triaged
assignee: nobody → Facundo Batista (facundo)
importance: Undecided → High
milestone: none → alpha1
Changed in magicicada:
assignee: Facundo Batista (facundo) → Natalia Bidart (nataliabidart)
milestone: alpha1 → alpha2
status: Triaged → In Progress
Changed in magicicada:
status: In Progress → Fix Committed
Changed in magicicada:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers