You are not logged in.

#1 2011-06-20 23:16:20

Floft
Member
Registered: 2009-11-15
Posts: 36
Website

Libre Office Uno

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.

Offline

#2 2011-08-14 22:52:37

jsivak
Member
Registered: 2011-05-13
Posts: 6

Re: Libre Office Uno

The patch in this bug post helped me:

https://bugs.archlinux.org/task/23733

Offline

#3 2011-08-14 23:49:28

Floft
Member
Registered: 2009-11-15
Posts: 36
Website

Re: Libre Office Uno

If I do export URE_BOOTSTRAP="file:///usr/lib/libreoffice/program/fundamentalrc" in addition to the PYTHONPATH, it works now. smile Thank you.

Offline

Board footer

Powered by FluxBB