Problems using PurpleAccountConnect

Matthew Gordon matthew at virsonainc.com
Thu May 7 18:42:43 EDT 2009


Hey Etan,

Thank you very much for the response.

What would I need to do differently to enable the account for Finch 
instead of for Pidgin? It's more convenient for my usage to just use 
Finch, but I can use Pidgin if necessary. When you refer to "enabling 
the account", are you referring specifically to the call to SetEnabled? 
That invocation does have some effect on Finch because I can check or 
uncheck the box next to the account in Finch using SetEnabled. It seems 
a bit odd that it would do that (and try to connect) but not actually 
put the account online.

-- Matthew


Etan Reisner wrote:
> On Thu, May 07, 2009 at 08:31:18PM +0200, Matthew Gordon wrote:
> <snip>
>   
>> import dbus, gobject
>>
>> bus = dbus.SessionBus()
>> obj = bus.get_object("im.pidgin.purple.PurpleService",
>> "/im/pidgin/purple/PurpleObject")
>> purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
>> account = purple.PurpleAccountsFind("exampleUsername","prpl-aim")
>> purple.PurpleAccountSetEnabled(account,"gtk-gaim", 1)
>> purple.PurpleAccountConnect(account)
>>
>> I have tried running the code with and without the SetEnabled line.
>> Either way, I cannot get my account to go online. The debug log from
>> Finch only shows the following:
>>
>> dbus: Need to register an object with the dbus subsystem.
>> dbus: The signal "dbus-introspect" caused some dbus error.
>> account: Connecting to account exampleUsername
>>
>> I don't think the dbus-introspection error is relevant, but I could be
>> wrong. Any insight on what is wrong or how I might figure that out would
>> be much appreciated!
>>
>> -- Matthew
>>     
>
> Correct, the DBus introspection errors are almost certainly not related.
>
> You need to enable an account before pidgin or finch will sign it on, your
> problem is that you are only enabling the account for pidgin and not for
> finch. Run pidgin and your code will likely work.
>
> Additionally, you often do not need to manually tell an account to
> connect. If the current global status says it should connect then it will
> connect as soon as enabled.
>
>     -Etan
>
>   




More information about the Devel mailing list