I add my question, I can start OpenOffice like this command, ./soffice "-accept=socket,host=localhost,port=2002;urp;"
But I user this command in the python code, ctx = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" ) I got error. __main__.NoConnectException: Connector : couldn't connect to socket (Success) I wonder why I cannot connect to Office application by python code. Thanks On Fri, Sep 10, 2010 at 4:59 PM, Soohong Min <[email protected]> wrote: > Hello, > > > I am testing my scipts which is written by python to operate Openoffice > 3.2.1.4 > After builing Openoffice 3.2.1.4, I cannot connect to Openoffice by > python codes. > >>>> . import socket >>>> import uno >>>> localContext = uno.getComponentContext() >>>> resolver = localContext.ServiceManager.createInstanceWithContext( > ... "com.sun.star.bridge.UnoUrlResolver", > localContext ) >>>> ctx = resolver.resolve( >>>> "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" ) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > __main__.NoConnectException: Connector : couldn't connect to socket (Success) > > > I can start Openoffice manually but cannot launch it by python script. > > When I tried to run my other scripts, I got error as it runs > connection part (resolver.resolve). > > Missing vcl resource. This indicates that files vital to localization > are missing. You might have a corrupt installation. > > How can I fix this problem? > Any help is appreciated. > > Thanks, > Min > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
