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

Importing com.sun.star.task.ErrorCodeIOException in Python

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


Joined: 12 Mar 2009
Posts: 2

PostPosted: Thu Mar 12, 2009 9:39 am    Post subject: Importing com.sun.star.task.ErrorCodeIOException in Python Reply with quote

This is apparently a really stupid question since I can't find anyone else who's had this problem.

Anyhow, I'm working on converting a Python script that deals with Excel spreadsheets from using Excel to save the files as CSVs to using OpenOffice (our customer wisely doesn't want to pay for MS Office). I was delighted when I found what I needed at this example but can't run it because I get the error:

Quote:

> python ssconverter.py NPPcmd.xls NPPcmd.csv

Traceback (most recent call last):
File "ssconverter.py", line 15, in ?
from com.sun.star.task import ErrorCodeIOException
File "C:\Program Files\OpenOffice.org 3\Basis\program\uno.py", line 297, in _uno_import
raise ImportError( "type "+ name + "." +x + " is unknown" )
ImportError: type com.sun.star.task.ErrorCodeIOException is unknown


So how do I tell Python how to find ErrorCodeIOException? I'm running Python 2.3.4 on Windows XP. Thanks.
Back to top
View user's profile Send private message
ToSeek
Newbie
Newbie


Joined: 12 Mar 2009
Posts: 2

PostPosted: Fri Mar 13, 2009 1:37 pm    Post subject: Reply with quote

Okay, I've installed and uninstalled and reinstalled and messed with PYTHONHOME and PYTHONPATH and am not seeing that problem any more. Now I'm seeing this one:

Quote:

C:\Documents and Settings\kparker\My Documents\Repository\Converter>"C:\Program
Files\OpenOffice.org 3\Basis\program\python-core-2.3.4\bin\python" ssconverter.p
y NPPcmd.xls NPPcmd.csv
Traceback (most recent call last):
File "ssconverter.py", line 12, in ?
import ooutils
File "C:\Documents and Settings\kparker\My Documents\Repository\Converter\oout
ils.py", line 36, in ?
import uno
File "C:\Program Files\OpenOffice.org 3\Basis\program\uno.py", line 38, in ?
_g_ctx = pyuno.getComponentContext( )
SystemError: Error during bootstrapping uno (RuntimeException):pyuno: couldn't instantiate invocation service



Advice is again most welcome. I've spent most of three days trying to get this simple script running and am at the point of telling our customer that they'll have to do the conversion on a machine with MS Office.
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