<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div> I'm trying to use the Python Dbus bindings to get an account already created in the account manager to connect automatically, and I'm getting an error that I don't understand while trying to set the "RequestedPresence" property on a Gabble Jabber account.</div><div><br></div><div> I can set other properties without trouble, but in this bit of code, the only things I've set have had simple types. The presence value is a struct, but I think I'm doing it right. In both snippets 'account' is a dbus proxy object for the account I'm trying to set values on.</div><div><br></div><div> This works:</div><div><div><div> print "ConnectAutomatically", account.object_path</div><div> account.Set('org.freedesktop.Telepathy.Account', 'ConnectAutomatically', True,</div><div> dbus_interface='org.freedesktop.DBus.Properties',</div><div> reply_handler=cb.get_callback(),</div><div> error_handler=util.error_handler_cb)</div><div><br></div></div><div><br></div><div> This doesn't:</div></div><div><div><div> print "RequestedPresence", account.object_path</div><div> account.Set('org.freedesktop.Telepathy.Account', 'RequestedPresence',</div><div> dbus.Struct((telepathy.constants.CONNECTION_PRESENCE_TYPE_AVAILABLE, 'available', 'asdf'),</div><div> signature='uss'),</div><div> dbus_interface='org.freedesktop.DBus.Properties',</div><div> reply_handler=cb.get_callback(),</div><div> error_handler=util.error_handler_cb)</div><div><br></div><div><br></div></div></div><div> It generates:</div><div><br></div><div><div>RequestedPresence /org/freedesktop/Telepathy/Account/gabble/jabber/aldemo1_40pobox_2eagnilux_2ecom1</div><div>Traceback (most recent call last):</div><div> File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 579, in msg_reply_handler</div><div> *message.get_args_list()))</div><div> File "/proj/gazette_dgarrett/sw/client-manager/src/telepathy/util.py", line 9, in error_handler_cb</div><div> raise exception</div><div>dbus.exceptions.DBusException: org.freedesktop.Telepathy.Error.InvalidArgument: Unexpected type for RequestedPresence: wanted (u,s,s), got GValueArray_gint+gchararray+gchararray_</div><div><br></div></div><div><span class="Apple-style-span" style="font-size: 12px; ">-- </span></div><div><span class="Apple-style-span" style="font-size: 12px; "><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Don</font></p><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>