Properties of type "v" and structs cause a traceback and aren't shown in the UI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
D-Feet |
Fix Released
|
Medium
|
|||
d-feet (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
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([
], signature=
When I attempt to look at this property in d-feet, I get the following
exception:
Traceback (most recent call last):
File "/usr/lib/
model[iter_][0] = obj.markup_str
File "/usr/lib/
s += " = %s" % (self.value)
TypeError: not all arguments converted during string formatting
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.
While looking at this in more detail, I noticed that basically anything that uses a struct will be affected, see the reproduction case below.
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 the upstream repository git://git.
problem is still present. On the git repository, however, the troublesome tuple
has moved to line 90.
The bug is reported upstream here:
https:/
Steps to reproduce:
- Install and launch d-feet on an Ubuntu 13.04 system, on a terminal so console output can be seen.
- Select the "session bus" tab (top right).
- On the search field, type "org.gnome.
- On the list of objects (right pane), expand /org/gnome/
- Under this, expand org.gnome.
- At the very end of the list of exposed properties/methods, double-click on "Array of [String] extensions (read)". The list of extensions will be loaded and shown immediately to the right of the field description and type. This is expected behavior.
- Double-click on "Struct of (Int32, Int32, Int32) version (read)".
Expected behavior:
- The version should be shown next to the field type/description, as with the "extensions" field above.
Actual behavior:
- Nothing is shown.
- Trace visible in the console:
Traceback (most recent call last):
File "/usr/lib/
model[iter_][0] = obj.markup_str
File "/usr/lib/
s += " = %s" % (self.value)
TypeError: not all arguments converted during string formatting
======
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: d-feet 0.3.3-1
ProcVersionSign
Uname: Linux 3.8.0-23-generic x86_64
NonfreeKernelMo
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Tue Jun 18 15:07:05 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-04-25 (53 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
PackageArchitec
SourcePackage: d-feet
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
summary: |
- Properties of type "v" cause a traceback and aren't shown + Properties of type "v" and structs cause a traceback and aren't shown in + the UI |
Changed in d-feet: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in d-feet: | |
status: | New → Fix Released |
Changed in d-feet (Ubuntu): | |
status: | New → Fix Released |