Issue 94993 - Bibus 1.4.3 does not work with OpenOffice 3.0 due to broken Python-UNO bridge
Summary: Bibus 1.4.3 does not work with OpenOffice 3.0 due to broken Python-UNO bridge
Status: RESOLVED FIXED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOo 3.0
Hardware: All All
: P3 Trivial with 18 votes (vote)
Target Milestone: ---
Assignee: joergbudi
QA Contact: issues@sw
URL: http://bibus-biblio.sourceforge.net/
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-16 10:41 UTC by chemwords
Modified: 2009-04-25 13:07 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
bibOOobase.py (40.07 KB, text/plain)
2008-10-20 22:09 UTC, elfunesto
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description chemwords 2008-10-16 10:41:48 UTC
On behalf of the user community of the Bibus bibliography manager I report to 
you that Bibus 1.4.3 does not work with OpenOffice 3.0, whereas it works 
perfectly with OOo 2.4.1.

The Bibus bibliography manager communicates with OOo through a Python-UNO 
bridge. Apparently this functionality has stopped working in OOo 3.0.

This issue is likely related to other pyuno issues (reported for the 3.0 RCs):
http://qa.openoffice.org/issues/show_bug.cgi?id=93885 
http://qa.openoffice.org/issues/show_bug.cgi?id=92661 
http://qa.openoffice.org/issues/show_bug.cgi?id=93994 


Steps to reproduce the error (OOo 3.0/WinXP SP3/Bibus 1.4.3 "full install")

I installed Bibus 1.4.3-3 (Full Windows Install) after installing the 
OpenOffice on a virgin system (no previous OOo nor Bibus installs).

On the first run of Bibus there was an error message, but restarting Bibus a 
second time solved this, and I had an "OpenOffice.org" menu item in Bibus! 
 
However, inserting a reference into the OpenOffice document generated 
invariably the a 'bibOOo_NoConnect' error. The developer indicates that this is 
due to a pyuno problem
 

References:

Issue discussed on the Bibus user forum:
http://sourceforge.net/forum/forum.php?thread_id=2245599&forum_id=380178
http://sourceforge.net/forum/forum.php?thread_id=2365499&forum_id=380177

Bibus:
http://bibus-biblio.sourceforge.net/
http://sourceforge.net/projects/bibus-biblio/
Comment 1 psyctc 2008-10-16 12:43:33 UTC
*** Issue 94993 has been confirmed by votes. ***
Comment 2 michael.ruess 2008-10-16 15:47:47 UTC
So this does not work due to broken Python bridge, it does not seem to be a
problem of the Word processing component.

MRU->JBU: could you please have a look at this?
Comment 3 chemwords 2008-10-16 16:13:20 UTC
Since Bibus interacts with the Word processor component (inserting and 
formatting bibliographies) the issue was posted here. The solution to the 
problem may indeed be elsewhere (everything is connected with everything...). 
Sorry if I did not choose the right place.
Comment 4 umbrasepia 2008-10-16 20:22:37 UTC
Unfortunately I have the same problem. Win XP, OOo 3.0, Bibus 1.4.3, Pipe/UNO
connection
The Bibus window says:

Traceback (most recent call last):
  File "..\BibFrame.py", line 1460, in onMenuOOoInsert
  File "..\BibFrame.py", line 1449, in __connectToWriter
AttributeError: 'module' object has no attribute 'bibOOo_NoConnect'


- Many thanks
Comment 5 joergbudi 2008-10-16 22:56:30 UTC
@umbrasepia: I will soon publish a list of workarounds at
http://udk.openoffice.org/pyuno/python-bridge.html, there will also be the
solution for your problem.

@chemwords:
The python scripting framework (scripts within openoffice via Extras/Macro/)
does not work, when you have a python 2.3 installed on your windows system (more
precisly, when there exists a python23.dll in your windows/system32 directory).
  You can work around it for now by copying Basis\program\python23.dll to
program\.  beside the soffice.bin executable. This forces the soffice process
load the library beside the office process instead the one in system32.



Bye, Joerg
Comment 6 brendel 2008-10-17 12:58:07 UTC
The workaround suggested by jbu does not seem to work : 
I just installed OO3.0. I checked before installation : I do not have
python23.dll  in the windows system directory
Then after installation I moved phython23.dll from basis/program to program/
I was able to run the uno connection wizard supplied by Bibus, checking the
connection using this wizard said that the uno connection is open using a pipe. 
However when running bibus, there was no automaic detection of OO presence (no
menu itme); I could get the menu item by manually changing the preferences.
however when trying to insert a reference I get the same 'bibOOo_NoConnect'
error as everybody else.
So I guess something else is going on

Cheers

Oliver
Comment 7 Stephan Bergmann 2008-10-20 10:27:23 UTC
For the problem of picking up a wrong python23.dll from a system directory, see
issue 94355.
Comment 8 chemwords 2008-10-20 10:39:24 UTC
I also find that the workaround suggested for the Windows version of OOo3 does
not work. I have no Python installed on the machine I use for testing. Moving
the python23.dll into the \program directory does not solve the problem.

I even tried copying the 'python23.dll' from OOo2.4 into the OOo3 installation
directory, but the problem remains the same. Perhaps more python-related
components from OOo2.4 should be copied to the OOo3 install to work around the
problem. I have not tried this yet, in the hope that there will be a simpler and
more solid solution soon. 

For Linux, a workaround apparently exists (according to the lead developer
Pierre Martineau):

| Under linux (at least Ubuntu), you can use the pyuno bridge from 2.4 with the
| stock openoffice3. Don't do anything special, just install Ubuntu 2.4 with
| the python-uno pacjage, install stock OOo3 (I have just tested the last rc3)
| wihout desinstalling 2.4 (installation in /opt is fine) and everything should
| work.
| 
| Pierre 


 
Comment 9 Stephan Bergmann 2008-10-20 10:49:00 UTC
@chemwords:  The python23.dll problem appears to be a red herring here (I do not
know why jbu brought it up in this issue).  At least for me Bibus failed to work
with OOo 3 independent of the python23.dll problem, see
<http://udk.openoffice.org/servlets/ReadMsg?list=dev&msgNo=4160> (there was no
python23.dll in the windows system directory).
Comment 10 chemwords 2008-10-20 11:16:44 UTC
@sb: Thanks for the info 

In
<http://udk.openoffice.org/source/browse/udk/www/python/python-bridge.html?rev=1.39>
some potential workarounds for Python-UNO problems are described.
I can confirm that workaround #1 (the infamous "python23.dll") and workaround #3
("set URE_BOOTSTRAP...") do NOT solve the Bibus-OOo3 connection problem.
I have not tried workaround #2 (this would require installing the source code
version of Bibus)
Comment 11 joergbudi 2008-10-20 21:58:07 UTC
Hi,

sorry for the confusion around python23.dll, this actually solves a problem but 
not the bibus one.

The bibus stuff is very hard to debug (it is binary compiled python code). 

The actual error message points to a problem not related to pyuno directly. It 
actually says, that OOo has no bibOOo_NoConnect element, which acutally can 
only occur, when the module OOo somehow exists, but all the 
bibOOoBase.py/bibOOoPlus.py has not been imported. To, this looks like some 
other initialization error.

I currently doubt, that the office connection code has ever been reached. In 
order to give more support here, I actually need the exception, that comes from 
the bibOOoBase.__init__ code. 

Can you provide such a stacktrace ?

When I look into the bibus installation directory, I find a pyuno.dll and a 
python23.dll. Where are these dlls from ? Do they get used ? 

Bye,

Joerg 
Comment 12 elfunesto 2008-10-20 22:09:35 UTC
Created attachment 57337 [details]
bibOOobase.py
Comment 13 elfunesto 2008-10-20 22:13:27 UTC
Hi jbu,
Thanks for your help to solve this problem. Do you know that a non compiled
version of bibus exist so that you can check the source code? It might help you
to debug the problem. You can download it there:
http://downloads.sourceforge.net/bibus-biblio/bibus-1.4.3-Win32-Setup.exe?use_mirror=

You can also browse the source code there:
http://bibus-biblio.cvs.sourceforge.net/viewvc/bibus-biblio/bibus/


I also attached the bibooobase.py file.
I hope that will help and thanks again for your help. Cheers,
Hilaire
Comment 14 elfunesto 2008-10-22 17:36:10 UTC
Hi,
The method described there
https://sourceforge.net/forum/message.php?msg_id=5481909 solves the issue in my
case.
Cheers,
Hilaire
Comment 15 elfunesto 2008-10-22 19:48:32 UTC
Thanks again for your quick help to solve the problem which was really appreciated.
It seems that adding
os.environ["URE_BOOTSTRAP"]="file:///C:/Program%20Files/OpenOffice.org%203/program/fundamental.ini"

(solution was proposed by Joerg) was the key point to solve the problem.
Cheers,
Hilaire
Comment 16 chemwords 2008-10-23 12:03:25 UTC
I confirm that the proposed work-around is successful.

On WinXP, installing Python 2.3 (+wxpython +pysqlite) and the Bibus source
version (using 'bibus-1.4.3-Win32-Setup.exe') followed by the changes suggested
by Pierre Martineau ('bibus.cfg' and to 'bibusStart.py') leads indeed to a
functional Bibus 1.4.3 with OOo3.

Apparently the URE_BOOTSTRAP must be set from within the Bibus/Python code(?),
and the search path for the OpenOffice executables must be changed relative to
working with OOo2.4.

Thanks to you all
Martijn
Comment 17 chemwords 2008-10-23 14:31:19 UTC
For Bibus/OOo3 on Windows XP the problem appears to be solved. The solution 
will probably rapidly find its way into a future release of Bibus.

I am not sure about the situation with Linux, and even less sure about Bibus/
OOo3 on Mac OS-X (has anyone tried?!).

I am new to qa.openoffice.org: can the problem be considered "FIXED" now that 
there is a work-around for WinXP?
Comment 18 joergbudi 2009-04-25 13:07:03 UTC
see comments above, there is a workaround for OO3.0.x, so I set this issue to 
fixed.

Note that OOo3.1.0rc2 (or final) will come with python-2.6.1. Please recheck 
bibus once OO3.1.0rc2 is out.

Bye,

Joerg