When running a python sample script provided in the libreoffice package, I get the following error:
[garrett ~]$ python2 /usr/lib/libreoffice/basis3.4/share/Scripts/python/pythonSamples/TableSample.py Traceback (most recent call last): File "/usr/lib/libreoffice/basis3.4/share/Scripts/python/pythonSamples/TableSample.py", line 4, in <module> from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK File "/usr/lib/libreoffice/basis-link/program/uno.py", line 291, in _uno_import raise ImportError( "type "+ name + "." +x + " is unknown" ) ImportError: type com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK is unknown
I have /usr/lib/libreoffice/basis-link/program/ in my PYTHONPATH; otherwise I get "No module named uno." Am I missing some other environmental variables? The only reason I actually care about this sample script is that other applications using python uno return the same type of errors, although I suppose it is possible they are completely unrelated.
The patch in this bug post helped me: