https://bugs.documentfoundation.org/show_bug.cgi?id=127009
--- Comment #12 from Konstantin Kharlamov <[email protected]> --- (In reply to Buovjaga from comment #11) > (In reply to Konstantin Kharlamov from comment #10) > > So, I am trying to repro this again, and I'm getting the following error: > > > > Traceback (most recent call last): > > File "/tmp/test.py", line 1, in <module> > > import uno > > File "/usr/lib/python3.12/site-packages/uno.py", line 19, in <module> > > import pyuno > > ModuleNotFoundError: No module named 'pyuno' > > > > Note: I am importing `uno`, however the error goes from the LibreOffice > > internals about "pyuno" instead. > > > > I made a file search for a file named "pyuno"¹ in the sources and LO repo > > has none. I presume this is a new bug on the LO side…? > > > > 1: > > https://github.com/ > > search?q=repo%3ALibreOffice%2Fcore+path%3A**%2Fpyuno*&type=code > > Not a bug on LibreOffice's side. You seem to have installed uno.py via pip. > Better to use what is shipped with LibreOffice. Checked: `uno.py` is the one shipped with LibreOffice λ pacman -Qo /usr/lib/python3.12/site-packages/uno.py /usr/lib/python3.12/site-packages/uno.py is owned by libreoffice-fresh 24.2.4-1 λ pacman -Qo /usr/lib/libreoffice/program/* | grep -v libreoffice-fresh [… no output, i.e. everything's owned by libreoffice-fresh …] > This might help to check: > export PYTHONPATH=/usr/lib/libreoffice/program/:$PYTHONPATH This indeed has helped. However, I had never had to use PYTHONPATH env. variable AFAIR, so something's changed compared to how it worked before… I just checked whether I rebooted the system after the last update, and I did, so that's not it… > For me, nothing is printed with test.py with the original steps (uno is > imported fine). With the `PYTHONPATH` workaround I get this error printed: λ python3 test.py Traceback (most recent call last): File "/tmp/test.py", line 13, in <module> desktop = connectToLO() ^^^^^^^^^^^^^ File "/tmp/test.py", line 11, in connectToLO return smgr.createInstanceWithContext( "com.sun.star.frame.Desktop", ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ com.sun.star.uno.RuntimeException: Binary URP bridge disposed during call at /usr/src/debug/libreoffice-fresh/libreoffice-24.2.4.2/binaryurp/source/bridge.cxx:615 -- You are receiving this mail because: You are the assignee for the bug.
