Bug 158346

Summary: The ScriptForge library has crashed. The reason is unknow.
Product: LibreOffice Reporter: PHAM XUAN TIEN <phamxtien>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: rafael.palma.lima
Priority: medium    
Version: 7.6.3.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 159638    

Description PHAM XUAN TIEN 2023-11-23 23:24:33 UTC
Description:
It runs smooth with 7.5.8
After upgrade to 7.6.3~rc2-0ubuntu0.23.04.1~lo3
I got message when run python script
-----------------------------------
Library: ScriptForge
Service: Session
Method: ExecutePythonScript

The ScriptForge library has crashed. The reason is unknow.
Maybe a bug that could be report on https://bugs.documentfoundation.org/

More details:

Location: Session.ExecutePythonScript/300
An exception occured
Type: com.sun.star.script.provider.ScriptFrameworkErrorException
Message: <class 'importError'>: No module named 'scriptforge' (or 'scriptforge.CreateScriptService' is unknown)
File "usr/lib/libreoffice/program/pythonscript.py" line 1058, in getScript.
...........
-----------------------------------

Steps to Reproduce:
1.From Ubuntu 23.04, upgrade from 7.5.8 to 7.6.3 rc2
2.Run any python macro

Actual Results:
Macro not run, it return an error 
-----------------------------------
Library: ScriptForge
Service: Session
Method: ExecutePythonScript

The ScriptForge library has crashed. The reason is unknow.
Maybe a bug that could be report on https://bugs.documentfoundation.org/

More details:

Location: Session.ExecutePythonScript/300
An exception occured
Type: com.sun.star.script.provider.ScriptFrameworkErrorException
Message: <class 'importError'>: No module named 'scriptforge' (or 'scriptforge.CreateScriptService' is unknown)
File "usr/lib/libreoffice/program/pythonscript.py" line 1058, in getScript.
...........

Expected Results:
Python macro runs


Reproducible: Always


User Profile Reset: No

Additional Info:
Python macro runs
Comment 1 Rafael Lima 2023-11-24 18:32:37 UTC
This is caused by the way Ubuntu packages LibreOffice.

Since LO 7.6, the package maintainers decided to ship ScriptForge in a separate package. So if you want to use scriptforge, you need to install the python3-scriptforge package

sudo apt install python3-scriptforge

This should fix your problem.

I should note that this was not a decision made by LibreOffice devs, but instead by the maintainers of the LibreOffice packages on Ubuntu.
Comment 2 Werner Tietz 2023-11-25 06:39:13 UTC
The "Ubuntu-maintainers" have a reputation for going their own way from time to time, but in this case they made a wise decision!

+1 Ubuntu
Comment 3 PHAM XUAN TIEN 2023-11-25 23:35:57 UTC
Thank you for your comment, i will upgrade to 7.6
Comment 4 Rafael Lima 2023-11-26 13:29:40 UTC
Closing this as NB, since it didn't actually need a patch to fix it.