Bug 35314 - Expected interface on Connection object doesn't exist
Summary: Expected interface on Connection object doesn't exist
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-python (show other bugs)
Version: git master
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 13:17 UTC by Andrew Moffat
Modified: 2019-12-03 20:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Andrew Moffat 2011-03-14 13:17:15 UTC
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]
Comment 1 Danielle Madeley 2011-06-06 15:58:53 UTC
It looks like you need to ready your object.
Comment 2 GitLab Migration User 2019-12-03 20:14:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-python/issues/18.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.