Expected interface on Connection object doesn't exist
Submitted by Andrew Moffat
Assigned to Telepathy bugs list
Description
The interface "org.freedesktop.Telepathy.Connection.Interface.Requests" doesn't exist on my Connection object, although it should. According to some examples http://telepathy.freedesktop.org/wiki/DTube%20Tutorial%20Example , there should be quite a few interfaces, but if I print out the Connection object's _interfaces property, I get the following:
{'org.freedesktop.Telepathy.Connection': <Interface <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0xa84a65c> :1.97 /org/freedesktop/Telepathy/Connection/gabble/jabber/_40gmail_2ecom_2f at 0xa85334c> implementing 'org.freedesktop.Telepathy.Connection' at 0xa85332c>}
There's only one? I should note that this only happened recently after the telepathy-core ubuntu maverick auto-upgrade to version 23
Here's the minimum amount of code to reproduce the error:
import gobject import dbus.mainloop.glib import dbus import telepathy import telepathy.client from telepathy.interfaces import * from telepathy.constants import * dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
print telepathy.version # (0, 15, 20, 1)
account = "" # a gchat account password = "" # a gchat password
reg = telepathy.client.ManagerRegistry() reg.LoadManagers() cm = reg.GetManager("gabble")
data = {"account": account, "password": password}
bus_name, object_path = cm[CONNECTION_MANAGER].RequestConnection("jabber", data)
conn = telepathy.client.Connection(bus_name, object_path)
conn[CONNECTION].Connect()
#Traceback (most recent call last):
#File "telepathy_bug.py", line 22, in <module>
#print conn[CONNECTION_INTERFACE_REQUESTS]
#File "/usr/local/lib/python2.6/dist-packages/telepathy/client/interfacefactory.py", line 74, in getitem
#raise KeyError(name)
#KeyError: 'org.freedesktop.Telepathy.Connection.Interface.Requests'
print conn[CONNECTION_INTERFACE_REQUESTS]
Version: git master