GNOME Bugzilla – Bug 629041
Socket error on python ldtp import when running from ssh'd terminal
Last modified: 2010-09-08 10:15:37 UTC
Steps to reproduce: Install ldtp2 on testhost enable accessibility on testhost login to testhost desktop python import ldtp You'll see a few warnings about GFlags being cast to enums, ignore those. ldtp functions correctly. Now ssh from anotherhost to testhost (you can try ssh -X, set your DISPLAY, xhost+...), in all cases, ldtp cannot be run remotely because of socket connect errors: bash-4.0$ python Python 2.6.4 (r264:75706, Aug 16 2010, 16:36:38) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import ldtp ** (-c:1191): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags' ** (-c:1191): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags' ** (-c:1191): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags' Traceback (most recent call last):
+ Trace 223590
pyatspi.setCacheLevel(pyatspi.CACHE_PROPERTIES)
r.registerEventListener(_updateCache, *constants.CACHE_EVENTS)
raise RuntimeError('Could not find or activate registry')
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/site-packages/ldtp/__init__.py", line 257, in <module> _populateNamespace(globals()) File "/usr/lib/python2.6/site-packages/ldtp/__init__.py", line 60, in _populateNamespace for method in client._client.system.listMethods(): File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib/python2.6/site-packages/ldtp/client.py", line 73, in request self, host, handler, request_body, verbose=0) File "/usr/lib/python2.6/xmlrpclib.py", line 1235, in request self.send_content(h, request_body) File "/usr/lib/python2.6/xmlrpclib.py", line 1349, in send_content connection.endheaders() File "/usr/lib/python2.6/httplib.py", line 892, in endheaders self._send_output() File "/usr/lib/python2.6/httplib.py", line 764, in _send_output self.send(msg) File "/usr/lib/python2.6/httplib.py", line 723, in send self.connect() File "/usr/lib/python2.6/httplib.py", line 704, in connect self.timeout) File "/usr/lib/python2.6/socket.py", line 514, in create_connection raise error, msg socket.error: [Errno 146] Connection refused >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit >>>
It looks like this problem has gone away, or at least improved in ldtp 2.0.6 and the latest pyatspi. It still seems to exist in libwnck. I'll log a bug there if I can reproduce.