[Telepathy] Type Conversion Error in PyGI tp-glib

Mystilleef mystilleef at gmail.com
Mon Jun 13 05:56:12 PDT 2011


On Mon, Jun 13, 2011 at 7:27 AM, Danielle Madeley
<danielle.madeley at collabora.co.uk> wrote:
> Paste the code somewhere?
>
> On Mon, 2011-06-13 at 07:03 -0400, Mystilleef wrote:
>> On Mon, Jun 13, 2011 at 5:04 AM, Danielle Madeley
>> <danielle.madeley at collabora.co.uk> wrote:
>> > On Sun, 2011-06-12 at 03:12 -0400, Mystilleef wrote:
>> >> I get the following error when I use an integer parameter
>> >> during account creation:
>> >>
>> >> Traceback (most recent call last):
>> >>   File "/home/lateef/teletest/AccountCreator.py", line 75, in __create_async_cb
>> >>     account = telepathy_account_manager.create_account_finish(result)
>> >>   File "/usr/lib/python2.7/site-packages/gi/types.py", line 44, in function
>> >>     return info.invoke(*args)
>> >> glib.GError: org.freedesktop.DBus.GLib.UnmappedError.McdAccountManagerError.Code0:
>> >> Failed to set parameter: parameter keepalive-interval must be of type
>> >> guint, not gint
>> >>
>> >> Python only uses ints, no uints. And I can't find a way to
>> >> convert from Python ints to Glib uints.
>> >>
>> >> I'm I doing something wrong? Or is this a bug?
>> >
>> > Use the constructors in dbus.types. e.g. dbus.UInt32
>> > http://dbus.freedesktop.org/doc/dbus-python/api/dbus.types-module.html
>

Code is here.

http://pastebin.com/CJ4FUA0B

It creates an SIP Account. You have to provide an ACCOUNT
and PASSWORD. See lines 5 and 6.

On line 65 when I use PARAMETERS_BUGGY I get the following
error:

============================================================
Initialized telepathy account manager
telepathy account manager is prepared

** (process:6253): WARNING **: Cannot marshal type "PyObject" in variant
**
ERROR:dbus-gproxy.c:2179:dbus_g_proxy_marshal_args_to_message: code
should not be reached
============================================================

This error is a little different from the one I posted
earlier. Still trying to figure out why.

If you change PARAMETERS_BUGGY to PARAMETERS on line 65,
it should create the account without any errors.

Although this new error doesn't provide any clues as to what
the problem is, the first error I posted earlier suggests it
might be a type conversion problem in the "keepalive-
interval" value in the parameters. I'm re-posting the first
error I was getting.

============================================================
Traceback (most recent call last):
 File "/home/lateef/teletest/AccountCreator.py", line 75, in __create_async_cb
   account = telepathy_account_manager.create_account_finish(result)
 File "/usr/lib/python2.7/site-packages/gi/types.py", line 44, in function
   return info.invoke(*args)
glib.GError: org.freedesktop.DBus.GLib.UnmappedError.McdAccountManagerError.Code0:
Failed to set parameter: parameter keepalive-interval must be of type
guint, not gint
============================================================


More information about the telepathy mailing list