python转换wps word文档出错
('Opening', '/opt/pythontest/sample.doc')
Traceback (most recent call last):
File "doc2pdf.py", line 14, in <module>
doc = app.get_Documents().Open(file)
File "/opt/pythontest/wpsrpcclient.py", line 326, in __call__
return self.__send(self.__name, args)
File "/opt/pythontest/wpsrpcclient.py", line 301, in __request
return sendApiRequest(self.uri, methodName, params)
File "/opt/pythontest/wpsrpcclient.py", line 62, in sendApiRequest
response = sendRequest(rpcClientPort, uri, request)
File "/opt/pythontest/wpsrpcclient.py", line 153, in sendRequest
sock.send('''POST %s HTTP/1.1\r\nContent-Type: text/xml\r\nContent-Length: %s\r\n\r\n%s''' % (uri, len(request), request))
socket.error: [Errno 107] Transport endpoint is not connected
代码链接
http://bbs.wps.cn/thread-22584090-1-1.html