GNOME Bugzilla – Bug 702593
Properties of type "v" cause a traceback and aren't shown
Last modified: 2013-06-19 06:16:39 UTC
Our project is presenting a dbus service exposing some objects which have a property of type "v" (variant). On the Python side, those contain a tuple of a string and two integers. So the "container" has dbus_signature="v" and the content is put together like this: dbus.Struct([ filename, line_start, line_end ], signature=dbus.Signature("(suu)")) When I attempt to look at this property in d-feet, I get the following exception: Traceback (most recent call last):
+ Trace 232097
model[iter_][0] = obj.markup_str
s += " = %s" % (self.value)
One of my colleagues figured out that the string formatting in line 87 is missing a comma (single-element tuple syntax is botched). If I change line 87 to read: s += " = %s" % (self.value, ) then things work as expected and d-feet is able to properly show the variant data in the UI. This was observed on d-feet 0.3.3 on an Ubuntu 13.04 system, I also checked and the code is still like this in git://git.gnome.org/d-feet, so I assume the problem is still present. On the git repository, however, the troublesome tuple has moved to line 90.
The matching bug report on Ubuntu's bug tracking system has a reproduction case: https://bugs.launchpad.net/d-feet/+bug/1192296 This can be reproduced on Ubuntu 13.04, or potentially on any system that has org.gnome.zeitgeist.engine available through session dbus. The bug seems to affect any property using a struct, not only variants.
Hi Daniel, thanks for the bugreport. I fixed the problem in git master and added a simple unittest.