Opened 11 years ago
Closed 11 years ago
#563 closed defect/bug (fixed)
dbus set_center(s) can not be called?
Reported by: | timo lindfors | Owned by: | cp15 |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | dbus | Version: | git master |
Severity: | Keywords: | ||
Cc: |
Description
dbus/test.py
#! /usr/bin/python import dbus bus = dbus.SessionBus?() conn = bus.get_object('org.navit_project.navit',
'/org/navit_project/navit')
iface = dbus.Interface(conn, dbus_interface='org.navit_project.navit'); iter=iface.attr_iter(); navit=bus.get_object('org.navit_project.navit', conn.get_attr_wi("navit",iter)[1]); iface.attr_iter_destroy(iter); navit_iface = dbus.Interface(navit, dbus_interface='org.navit_project.navit.navit'); navit_iface.set_center((1,0x138a4a,0x5d773f));
works but I can't figure out how to generate those coordinates or what "1" means as projection. I tried to change the last line to
navit_iface.set_center("geo: 24.0 60.0")
but then I get
ERROR:dbus.connection:Unable to set arguments ('geo: 60.0 24.0',) according to signature u'(iii)': <type 'exceptions.TypeError?'>: an integer is required Traceback (most recent call last):
File "./test.py", line 12, in <module>
navit_iface.set_center("geo: 60.0 24.0")
File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 68, in call
return self._proxy_method(*args, keywords)
File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in call
keywords)
File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 620, in call_blocking
message.append(signature=signature, *args)
TypeError?: an integer is required
I'm using navit 0.2.0~svn2974+dfsg.1-1 in debian unstable.
It seems that if I use a different name for the set_center version that takes a string as argument everything works. The attached patch adds set_center_by_string which can be used with
navit_iface.set_center_by_string("geo: 24.0 60.0")
Attachments (1)
Change History (2)
Changed 11 years ago by timo lindfors
comment:1 Changed 11 years ago by woglinde
- Resolution set to fixed
- Status changed from new to closed
fixed with svn revision 2081
http://navit.svn.sourceforge.net/viewvc/navit?view=rev&revision=2081