After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629041 - Socket error on python ldtp import when running from ssh'd terminal
Socket error on python ldtp import when running from ssh'd terminal
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtp2
2.0.0
Other Solaris
: Normal normal
: ---
Assigned To: LDTP Development Mailing List
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2010-09-08 10:05 UTC by Brian Nitz
Modified: 2010-09-08 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Brian Nitz 2010-09-08 10:05:28 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):
  • File "<string>", line 1 in <module>
  • File "/usr/lib/python2.6/site-packages/ldtpd/__init__.py", line 56 in main
    pyatspi.setCacheLevel(pyatspi.CACHE_PROPERTIES)
  • File "/usr/lib/python2.6/vendor-packages/pyatspi/accessible.py", line 91 in setCacheLevel
    r.registerEventListener(_updateCache, *constants.CACHE_EVENTS)
  • File "/usr/lib/python2.6/vendor-packages/pyatspi/registry.py", line 331 in __getattribute__
    raise RuntimeError('Could not find or activate registry')
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
>>>
Comment 1 Brian Nitz 2010-09-08 10:15:37 UTC
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.