pyODconverter problemsn OS X 10.6.5 with LibreOffice 3.3rc1 (JODConverter works OK)

215 views
Skip to first unread message

emendelson

unread,
Dec 22, 2010, 7:44:00 PM12/22/10
to JODConverter
I have the pyODconverter working perfectly under Windows XP with
LibreOffice 3.3rc1. I'm very grateful for this superb tool.

Unfortunately, I can't make it work under OS X 10.6.5 with the same
version of LibreOffice.

First I start LibreOffice with this command:

/Applications/LibreOffice.app/Contents/MacOS/soffice -
accept="socket,host=localhost,port=8100;urp;" -headless -
nofirststartwizard

The LibreOffice icon appears in the dock.

I then run this command in the same terminal where I launched soffice:

~/Desktop/DocumentConverter.py ~/Desktop/Test.doc ~/Desktop/Test.pdf

And this is the resulting output:

-----------
/Users/edward/Desktop/DocumentConverter.py: line 11:
DEFAULT_OPENOFFICE_PORT: command not found
/Users/edward/Desktop/DocumentConverter.py: line 13: import: command
not found
from: can't read /var/mail/os.path
from: can't read /var/mail/com.sun.star.beans
from: can't read /var/mail/com.sun.star.task
from: can't read /var/mail/com.sun.star.connection
/Users/edward/Desktop/DocumentConverter.py: line 19: FAMILY_TEXT:
command not found
/Users/edward/Desktop/DocumentConverter.py: line 20: FAMILY_WEB:
command not found
/Users/edward/Desktop/DocumentConverter.py: line 21:
FAMILY_SPREADSHEET: command not found
/Users/edward/Desktop/DocumentConverter.py: line 22:
FAMILY_PRESENTATION: command not found
/Users/edward/Desktop/DocumentConverter.py: line 23: FAMILY_DRAWING:
command not found
/Users/edward/Desktop/DocumentConverter.py: line 32:
IMPORT_FILTER_MAP: command not found
/Users/edward/Desktop/DocumentConverter.py: line 33: txt:: command not
found
/Users/edward/Desktop/DocumentConverter.py: line 34: FilterName::
command not found
/Users/edward/Desktop/DocumentConverter.py: line 35: FilterOptions::
command not found
/Users/edward/Desktop/DocumentConverter.py: line 36: },: command not
found
/Users/edward/Desktop/DocumentConverter.py: line 37: csv:: command not
found
/Users/edward/Desktop/DocumentConverter.py: line 38: FilterName::
command not found
/Users/edward/Desktop/DocumentConverter.py: line 39: FilterOptions::
command not found
/Users/edward/Desktop/DocumentConverter.py: line 40: syntax error near
unexpected token `}'
/Users/edward/Desktop/DocumentConverter.py: line 40: ` }'
----------------

I did make DocumentConverter.py executable; the Python version on this
OS X system is 2.6.1.

JODConverter works correctly, and I understand that I can use
JODConverter instead, but I would like to follow the author's advice
and use the simpler version, because I only need this as a command-
line tool.

Am I misunderstanding something simple and obvious?

Thanks for any help.


Brian Fenton

unread,
Dec 23, 2010, 11:54:22 AM12/23/10
to jodcon...@googlegroups.com
Hi

you need to call the Python script using the version of the Python exe that comes with OpenOffice e.g.
/opt/openoffice.org3/program/python ./DocumentConverter.py ./Test.doc ./Test.pdf

hope this helps
Brian



--
You received this message because you are subscribed to the Google Groups "JODConverter" group.
To post to this group, send email to jodcon...@googlegroups.com.
To unsubscribe from this group, send email to jodconverter...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jodconverter?hl=en.


emendelson

unread,
Dec 23, 2010, 5:36:49 PM12/23/10
to JODConverter
Hi Brian,

Thank you for that. Unfortunately, LibreOffice for OS X doesn't
include a separate Python executable anywhere. It apparently relies
entirely on the native OS X Python.

I suppose it would make sense to try to add the appropriate OS X
executable version of Python but I'm not clear about which version is
required.

Any insight into this problem would be gratefully received.

Thank you!

Brian Fenton

unread,
Dec 28, 2010, 3:44:09 PM12/28/10
to jodcon...@googlegroups.com
Hi

unfortunately I don't use OS X so I can't help. :-(  However, I note you're using LibreOffice - have you tried the OpenOffice version for OS X? http://download.openoffice.org/other.html Maybe that will work for you, I don't know how different the 2 projects are.

hope this helps
Brian

emendelson

unread,
Dec 29, 2010, 2:07:40 PM12/29/10
to JODConverter
Hi again,

Thanks for the suggestion. Unfortunately, OpenOffice.org produces
exactly the same problem. I'll pursue another possibility on a
different thread...

Thanks again.

iwtppwko

unread,
Apr 23, 2013, 9:49:47 AM4/23/13
to jodcon...@googlegroups.com
Hey, what was the result from this emendelson

Bill Janssen

unread,
Apr 23, 2013, 2:23:31 PM4/23/13
to jodcon...@googlegroups.com
Pretty clearly, you were executing that Python script with /bin/sh instead of Python.  Don't do that!

Bill

iwtppwko

unread,
Apr 25, 2013, 10:11:27 AM4/25/13
to jodcon...@googlegroups.com
The problem is that not openoffice of libroffice have python included on the mac-build.
When trying the native python you get the message its the wrong python you're using.
I got stuck here also at the same point.

Laurens
Reply all
Reply to author
Forward
0 new messages