Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'xmlrpc_daemon' #45

Open
samir-plusb opened this issue Apr 13, 2018 · 5 comments
Open

ImportError: No module named 'xmlrpc_daemon' #45

samir-plusb opened this issue Apr 13, 2018 · 5 comments

Comments

@samir-plusb
Copy link

Hello,

I am trying to install LDTP on Ubuntu 16.04.04 LTS (inside a Docker container).

The following packages were installed:

apt-get install git python3-pip python3-twisted python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-pyatspi -y

And then I try to install LDTP with the following commands:

mkdir -p /tmp/ldtp
cd /tmp/ldtp
git clone https://github.com/ldtp/ldtp2.git
cd ldtp2
python3 setup.py build
python3 setup.py install

After executing ldtp on the CLI the following error appears and ldtp terminates:

Traceback (most recent call last):
  File "/usr/local/bin/ldtp", line 23, in <module>
    import ldtpd
  File "/usr/local/lib/python3.5/dist-packages/ldtpd/__init__.py", line 38, in <module>
    from xmlrpc_daemon import XMLRPCLdtpd
ImportError: No module named 'xmlrpc_daemon'

I have no experience developing with python but in my understanding, the module xmlrpc_daemon cannot be imported, which is is defined in the LDTP project itself.

Maybe someone in here knows how to fix this? I appreciate any help!

@schuellerf
Copy link
Contributor

I guess this is related to python3 support #54 not being implemented yet
please try to use python2 (as you are in ubuntu 16.04)

@schuellerf
Copy link
Contributor

Please check if #58 solves your problem

@linuxqiao
Copy link

linuxqiao commented Mar 9, 2021

Hi schuellerf, looks #58 fix the module issue, but I find another issue:

>>> from ldtp import *

(-c:27134): dbind-ERROR **: 01:57:18.583: AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/ldtp-3.6.0-py3.9.egg/ldtp/__init__.py", line 594, in <module>
    _populateNamespace(globals())
  File "/usr/local/lib/python3.9/site-packages/ldtp-3.6.0-py3.9.egg/ldtp/__init__.py", line 247, in _populateNamespace
    for method in client._client.system.listMethods():
  File "/usr/lib64/python3.9/xmlrpc/client.py", line 1116, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python3.9/xmlrpc/client.py", line 1456, in __request
    response = self.__transport.request(
  File "/usr/local/lib/python3.9/site-packages/ldtp-3.6.0-py3.9.egg/ldtp/client.py", line 156, in request
    h=self.send_request(host, handler, request_body, bool(verbose))
  File "/usr/lib64/python3.9/xmlrpc/client.py", line 1285, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib64/python3.9/xmlrpc/client.py", line 1315, in send_content
    connection.endheaders(request_body)
  File "/usr/lib64/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib64/python3.9/http/client.py", line 921, in connect
    self.sock = self._create_connection(
  File "/usr/lib64/python3.9/socket.py", line 843, in create_connection
    raise err
  File "/usr/lib64/python3.9/socket.py", line 831, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

@schuellerf
Copy link
Contributor

@linuxqiao the "Connection refused" happened to me often when the ldtp backend dies.
I didn't find all the reasons why ldtp sometimes dies, but how did you start ldtp?
Does ldtp have some debug output when you run it in a terminal and this happens?
(or run even with "ldtp -v" to check...)

@linuxqiao
Copy link

linuxqiao commented Mar 10, 2021

@schuellerf, interesting! it works today!
I just type 'from ldtp import *' in my python3 shell like:

$ python3
Python 3.9.2 (default, Feb 20 2021, 00:00:00) 
[GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ldtp import *
>>> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants