Hello!
I installed ldtp in virtualbox on windows xp(sp3) and when I try to import it in the Python code. I get the following error.
I installed ldtp in virtualbox on windows xp(sp3) and when I try to import it in the Python code. I get the following error.
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-1-1f3aec49213d> in <module>()
----> 1 import ldtp
C:\Program Files\VMware\CobraWinLDTP\ldtp\__init__.py in <module>()
553 return None
554
--> 555 _populateNamespace(globals())
556 _pollEvents = PollEvents()
557 thread.start_new_thread(_pollEvents.run, ())
C:\Program Files\VMware\CobraWinLDTP\ldtp\__init__.py in _populateNamespace(d)
225
226 def _populateNamespace(d):
--> 227 for method in client._client.system.listMethods():
228 if method.startswith('system.'):
229 continue
C:\Python27\lib\xmlrpclib.pyc in __call__(self, *args)
1222 return _Method(self.__send, "%s.%s" % (self.__name, name))
1223 def __call__(self, *args):
-> 1224 return self.__send(self.__name, args)
1225
1226 ##
C:\Python27\lib\xmlrpclib.pyc in __request(self, methodname, params)
1576 self.__handler,
1577 request,
-> 1578 verbose=self.__verbose
1579 )
1580
C:\Program Files\VMware\CobraWinLDTP\ldtp\client.pyc in request(self, host, handler, request_body, verbose)
134 self.send_host(h, host)
135 self.send_user_agent(h)
--> 136 self.send_content(h, request_body)
137
138 response = h.getresponse()
C:\Python27\lib\xmlrpclib.pyc in send_content(self, connection, request_body)
1437
1438 connection.putheader("Content-Length", str(len(request_body)))
-> 1439 connection.endheaders(request_body)
1440
1441 ##
C:\Python27\lib\httplib.pyc in endheaders(self, message_body)
967 else:
968 raise CannotSendHeader()
--> 969 self._send_output(message_body)
970
971 def request(self, method, url, body=None, headers={}):
C:\Python27\lib\httplib.pyc in _send_output(self, message_body)
827 msg += message_body
828 message_body = None
--> 829 self.send(msg)
830 if message_body is not None:
831 #message_body was not a string (i.e. it is a file) and
C:\Python27\lib\httplib.pyc in send(self, data)
789 if self.sock is None:
790 if self.auto_open:
--> 791 self.connect()
792 else:
793 raise NotConnected()
C:\Python27\lib\httplib.pyc in connect(self)
770 """Connect to the host and port specified in __init__."""
771 self.sock = socket.create_connection((self.host,self.port),
--> 772 self.timeout, self.source_address)
773
774 if self._tunnel_host:
C:\Python27\lib\socket.pyc in create_connection(address, timeout, source_address)
569
570 if err is not None:
--> 571 raise err
572 else:
573 raise error("getaddrinfo returns an empty list")
An unhandled exception: System.TypeInitializationException
If somebody knows how to fix this error please help!