I'm using Gentoo. After upgrade pyuno broken in app-office/libreoffice-3.4.2.3. In 3.3.3 all right. Reproducible: Always Steps to Reproduce: 1. USE="odk java" emerge =libreoffice-3.4.2.3 2. create new file: $ cat test.py #!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.append('/usr/lib/libreoffice/basis-link/program') import os import uno #a UNO struct later needed to create a document from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK from com.sun.star.text.TextContentAnchorType import AS_CHARACTER 3. execute script: $ python test.py Actual Results: executing with errors: Traceback (most recent call last): File "test.py", line 9, 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 Expected Results: executing without errors This patch solves the problem: --- /usr/lib/libreoffice/basis-link/program/uno.py_orig 2011-08-09 00:26:36.000000000 +0700 +++ /usr/lib/libreoffice/basis-link/program/uno.py 2011-08-15 10:41:26.000000000 +0700 @@ -25,7 +25,11 @@ # #************************************************************************* import sys +import os +sys.path.append('/usr/lib/libreoffice/basis-link/program') +if getattr(os.environ, 'URE_BOOTSTRAP', None) is None: + os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc" import pyuno import __builtin__ import socket # since on Windows sal3.dll no longer calls WSAStartup In libreoffice-3.3.3 uno.py contain these lines. I created a bug on Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=379227 but I was told to report here. Thanks.
You always needed that patch , and that patch is still available and applied if you use the build repos (http://cgit.freedesktop.org/libreoffice/build/tree/patches/dev300/pyuno-ooodir.diff.in?h=libreoffice-3-4). This was also the case in 3.3.3. So Gentoo dropped patches without knowing what dropping them breaks... Wrt your patch: theoretically OK, but practically, how do you know everyone has their OOo install in /usr/lib/libreoffice? Right, you don't... But yes, *somehow* this should work out of the box...
(ah, and http://cgit.freedesktop.org/libreoffice/build/tree/patches/dev300/system-python-ure-bootstrap.diff.in?h=libreoffice-3-4 before the mentioned patch)
(In reply to comment #1) > Wrt your patch: theoretically OK, but practically, how do you know everyone has > their OOo install in /usr/lib/libreoffice? Right, you don't... You are certainly right. I posted this patch with no claims to objectivity. Only to demonstrate the problem in my case. I put a link to your response to https://bugs.gentoo.org/show_bug.cgi?id=379227#c3 Thanks.
[This is an automated message.] This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it started right out as NEW without ever being explicitly confirmed. The bug is changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases. Details on how to test the 3.5.0 beta1 can be found at: http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1 more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
At the moment it is impossible to install the new version (see #395049), so I can not confirm or deny the existence of the bug in 3.4.99.2
On 3.4.5.2 and 3.5.0-r2 bug is not reproduced. In my opinion, the bug can be closed.
Dear bug submitter! Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs. To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem. Yours! Florian