On 12/10/2013 08:55 PM, Neeraj Rai wrote:
Traceback (most recent call last): File "libreconverter-master/libreconverter.py", line 18, in <module> import loutils File "libreconverter-master/loutils.py", line 39, in <module> import uno File "libreoffice-4.0/lib/libreoffice/program/uno.py", line 38, in <module> _g_ctx = pyuno.getComponentContext( ) SystemError: Error during bootstrapping uno (RuntimeException):missing whitespace before attribute in file:///<path>/libreoffice-4.2/lib/libreoffice/program/types/oovbaapi.rdb
"missing whitespace before attribute" is an error message generated in xmlreader/source/xmlreader.cxx, so it smells like your setup is such that it erroneously declares the oovbaapi.rdb as a services rdb (which are in XML format today) rather than a types rdb (which are in binary format).
What also looks odd is that your setup apparently mixes libreoffice-4.0/lib/libreoffice/program/uno.py and libreoffice-4.2/lib/libreoffice/program/types/oovbaapi.rdb.
What I noticed is that libreconverter's loutils.py has two bugs, one is a missing comma that made it completely nonfunctional at least for me and is fixed with <https://github.com/colonelqubit/libreconverter/commit/7e0f81ac96106ccb4baff4951126885841b1e887> "Merge pull request #1 from stbergmann/master" now.
The other is that it hardcodes the location of the LO installation as /usr/lib/libreoffice/program in the _lopaths variable. You presumably do have a LO installation there, but it likely doesn't match the LO installation from which you take the python executable to run libreconverter.py with.
What worked for me, trying it out with a local LO 4.2 build, is to patch loutils.py like
diff --git a/loutils.py b/loutils.py index 4bac3e1..c2d1364 100644 --- a/loutils.py +++ b/loutils.py @@ -19,7 +19,7 @@ LIBREOFFICE_PORT = 8100 # Find LibreOffice. _lopaths=( - ('/usr/lib/libreoffice/program', '/usr/lib/libreoffice/program'), + ('/home/sbergman/lo-4.2/core/instdir/program', '/home/sbergman/lo-4.2/core/instdir/program'), )
to match the LO installation of the python executable used when running libreconverter.py,
/home/sbergman/lo-4.2/core/instdir/program/python libreconverter.py test-headless3.xlsx output.csv
Stephan _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice