Description: I do the following: libreoffice --calc --accept='socket,host=localhost,port=2021;urp;' cd /usr/lib64/libreoffice/program python I then I get this error: >>> from scriptforge import ScriptForge, CreateScriptService Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/libreoffice/program/scriptforge.py", line 57, in <module> import uno File "/usr/lib64/python3.10/site-packages/uno.py", line 32, in <module> _component_context = pyuno.getComponentContext() SystemError: Error during bootstrapping uno (RuntimeException):URI libuno_cppuhelpergcc3.so.3 is expected to contain a slash /builddir/build/BUILD/libreoffice-7.3.6.2/cppuhelper/source/paths.cxx:44 >>> Could you please help me? Steps to Reproduce: I do the following: libreoffice --calc --accept='socket,host=localhost,port=2021;urp;' cd /usr/lib64/libreoffice/program python I then I get this error: >>> from scriptforge import ScriptForge, CreateScriptService Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/libreoffice/program/scriptforge.py", line 57, in <module> import uno File "/usr/lib64/python3.10/site-packages/uno.py", line 32, in <module> _component_context = pyuno.getComponentContext() SystemError: Error during bootstrapping uno (RuntimeException):URI libuno_cppuhelpergcc3.so.3 is expected to contain a slash /builddir/build/BUILD/libreoffice-7.3.6.2/cppuhelper/source/paths.cxx:44 >>> Could you please help me? Actual Results: >>> from scriptforge import ScriptForge, CreateScriptService Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/libreoffice/program/scriptforge.py", line 57, in <module> import uno File "/usr/lib64/python3.10/site-packages/uno.py", line 32, in <module> _component_context = pyuno.getComponentContext() SystemError: Error during bootstrapping uno (RuntimeException):URI libuno_cppuhelpergcc3.so.3 is expected to contain a slash /builddir/build/BUILD/libreoffice-7.3.6.2/cppuhelper/source/paths.cxx:44 >>> Expected Results: No error. Reproducible: Always User Profile Reset: No Additional Info:
(In reply to Paul Smith from comment #0) > Description: > I do the following: > > libreoffice --calc --accept='socket,host=localhost,port=2021;urp;' > cd /usr/lib64/libreoffice/program > python What exactly are you doing here? You just run python REPL and it gives you the error? I don't understand.
I just stumbled upon this issue... I guess the reason you're getting this error is because you're using your OS python interpreter instead of using LibreOffice's own python interpreter. In this case, you need to set the proper PYTHONPATH export PYTHONPATH=/usr/lib/libreoffice/program:/usr/lib/python3/dist-packages Note: /usr/lib/libreoffice/program --> this is where scriptforge.py is located /usr/lib/python3/dist-packages --> this is where uno.py is located So you need to set this first before launching the interpreter. I'll update the help page accordingly: https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03/sf_intro.html In summary, this is not a bug in ScriptForge nor LibreOffice... but an improvement in documentation is required.
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/e639a07cb41318324867952f5ef0d81dbda54236 tdf#151695 Improve documentation on setting PYTHONPATH