OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

couldn't connect to socket (WSANOTINITIALISED, WSAStartup()

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
AndrewZ
Moderator
Moderator


Joined: 21 Jun 2004
Posts: 4140
Location: Colorado, USA

PostPosted: Sun Apr 06, 2008 10:31 am    Post subject: couldn't connect to socket (WSANOTINITIALISED, WSAStartup() Reply with quote

Hi,

I've been using PyUNO for a while with Linux, but I am having a rough start on Windows XP. Here I am trying the PyUNO hello world but get an error.

Code:

C:\Program Files\OpenOffice.org 2.4\program>"C:\Program Files\OpenOffice.org 2.4\program"\python "C:\a\programs\py_hello"\hello_world.py
Traceback (most recent call last):
  File "C:\a\programs\py_hello\hello_world.py", line 16, in ?
    ctx = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
__main__.com.sun.star.connection.NoConnectException: Connector : couldn't connect to socket (WSANOTINITIALISED, WSAStartup() has not been called)



However, I think OOo is listening OK. I used cports to verify it is listening and telnet to verify it accepts connections.

Update: I noticed someone filed this as issue 87984
_________________
<signature>
* Did you solve your problem? Do others a favor: Post the solution
* OpenOffice.org Ninja
* BleachBit
</signature>
Back to top
View user's profile Send private message Visit poster's website
AndrewZ
Moderator
Moderator


Joined: 21 Jun 2004
Posts: 4140
Location: Colorado, USA

PostPosted: Sun Apr 06, 2008 4:36 pm    Post subject: Reply with quote

Update: solved by going back to v2.3.1
_________________
<signature>
* Did you solve your problem? Do others a favor: Post the solution
* OpenOffice.org Ninja
* BleachBit
</signature>
Back to top
View user's profile Send private message Visit poster's website
hanya
Super User
Super User


Joined: 04 May 2005
Posts: 543
Location: Japan

PostPosted: Tue Apr 08, 2008 1:55 am    Post subject: Reply with quote

I got the same error. Now I use the pipe instead of the socket.

Code:
ctx = resolver.resolve("uno:pipe,name=pypipe;urp;StarOffice.ComponentContext")

This works well on OOo 2.4 with WinXP.
Needs to start with:
Code:
soffice.exe "-accept=pipe,name=pypipe;urp;StarOffice.ServiceManager"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group