Problem sending message from Python

Tony Houghton h at realh.co.uk
Mon Apr 25 07:36:27 PDT 2005


I've been patching up more bits of ROX and come across another problem
in some Python capplets. They work OK with dbus 0.2x but not with 0.32
or CVS checked out about a couple of days ago:

rox_session = bus.get_service('net.sf.rox.Session')
rox_settings = rox_session.get_object('/Settings',
        'net.sf.rox.Session.Settings')
...
rox_settings.SetInt(self.name, self.int_value)

Traceback (most recent call last):
  File "/home/tony/Config/Font/settings.py", line 107, in set
    rox_settings.SetInt(self.name, self.int_value)
  File "/usr/local/stow/dbus//lib/python2.3/site-packages/dbus.py", line
235, in __call__
    reply_message = self._connection.send_with_reply_and_block(message,
5000)
  File "dbus_bindings.pyx", line 524, in
dbus_bindings.Connection.send_with_reply_and_block
dbus_bindings.DBusException: Argument 1 is specified to be of type
"int32", but is actually of type "uint32"

I'm a Python novice and didn't even realise you could do dynamic binding
like that use of "SetInt". Cool. But I think that's beside the point
really. I don't see how the Python program can have any control over the
type of the argument, so is that a bug in the dbus bindings? Or is it a
problem with the program receiving the message? If it's a bindings bug,
is it fixed in the new bindings checked in today?

-- 
TH * http://www.realh.co.uk


More information about the dbus mailing list