Details
Description
PySide6.QtDBus.QDBusVariant.variant() call crashes Python, I think because it returns QVariant which does not exist as datatype:
It should return a native type, but it simply crashes...
Here is the code:
service = "org.mpris.MediaPlayer2.spotifyd.instance896" path = "/org/mpris/MediaPlayer2" iface = "org.mpris.MediaPlayer2.Player" ifaceprops = "org.freedesktop.DBus.Properties" smp = QtDBus.QDBusInterface(service, path, interface=ifaceprops, connection=QtDBus.QDBusConnection.systemBus()) msg = smp.call("Get", iface, "Volume") result1 = msg.arguments()[0] v1 = result1.variant()
QDBus_DEBUG output looks ok:
QDBusConnectionPrivate(0x7f8400ed00) sending message: QDBusMessage(type=MethodCall, service="org.mpris.MediaPlayer2.spotifyd.instance896", path="/org/mpris/MediaPlayer2", interface="org.freedesktop.DBus.Properties", member="Get", signature="", contents=("org.mpris.MediaPlayer2.Player", "Volume") ) QDBusConnectionPrivate(0x7f8400ed00) got message reply: QDBusMessage(type=MethodReturn, service=":1.111", signature="v", contents=([Variant(double): 34]) )