ldtp install:TypeError必须是一个接口

时间:2014-11-18 21:17:19

标签: python

我需要将ldtp用于项目。我下载了源代码,安装了依赖项,然后使用python setup.py install安装了ldtp。我试图让这个工作在远程机器上,这是一个使用终端(ssh)的VM(kvm)。一切都很顺利,但当我import ldtp时,我收到以下错误:

>> import ldtp
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "ldtpd/__init__.py", line 64, in main
    from xmlrpc_daemon import XMLRPCLdtpd
  File "ldtpd/xmlrpc_daemon.py", line 25, in <module>
    import core
  File "ldtpd/core.py", line 24, in <module>
    from pyatspi import findDescendant, Registry
  File "/usr/lib/python2.7/dist-packages/pyatspi/__init__.py", line 19, in <module>
    from pyatspi.Accessibility import *
  File "/usr/lib/python2.7/dist-packages/pyatspi/Accessibility.py", line 111, in <module>
    Accessible = Atspi.Accessible
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 313, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 176, in __getattr__
    interfaces = tuple(interface for interface in get_interfaces_for_object(info)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 104, in get_interfaces_for_object
    interfaces.append(getattr(module, name))
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 313, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 215, in __getattr__
    wrapper = metaclass(name, bases, dict_)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 194, in __init__
    register_interface_info(cls.__info__.get_g_type())
TypeError: must be an interface
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ldtp/__init__.py", line 565, in <module>
    _populateNamespace(globals())
  File "ldtp/__init__.py", line 233, in _populateNamespace
    for method in client._client.system.listMethods():
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "ldtp/client.py", line 139, in request
    self.send_content(h, request_body)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1439, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 812, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 793, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err

socket.error: [Errno 111] Connection refused

任何帮助都将不胜感激。

0 个答案:

没有答案