[PyQt] QtDBus: Unable to convert Array of Object Paths

Chris Mayo cjmayo at users.sourceforge.net
Sun Nov 27 12:47:09 GMT 2011


With PyQt-x11-gpl-snapshot-4.9-e8284ed41e49, 
sip-4.13.1-snapshot-3b44dc2f0efd and:

bus = QtDBus.QDBusConnection.systemBus()
iface = QtDBus.QDBusInterface('org.freedesktop.UDisks',
	'/org/freedesktop/UDisks', 'org.freedesktop.UDisks', bus)

print(iface.call('EnumerateDeviceFiles').arguments())
print(iface.call('EnumerateDevices').arguments())


the end of the output is:

0000:00:1f.2-scsi-5:0:0:0-part2', '/dev/fd0']]
Traceback (most recent call last):
   File "./objectpath.py", line 10, in <module>
     print(iface.call('EnumerateDevices').arguments())
TypeError: unable to convert a C++ 'QDBusArgument' instance to a Python 
object


EnumerateDeviceFiles returns an Array of Strings, but EnumerateDevices 
returns an Array of Object Paths
http://hal.freedesktop.org/docs/udisks/UDisks.html#UDisks.EnumerateDevices

Python 3.2.2, Qt 4.7.4, udisks 1.0.4, dbus 1.4.16 on amd64 Linux

Chris


More information about the PyQt mailing list