Bug 158346 - The ScriptForge library has crashed. The reason is unknow.
Summary: The ScriptForge library has crashed. The reason is unknow.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ScriptForge
  Show dependency treegraph
 
Reported: 2023-11-23 23:24 UTC by PHAM XUAN TIEN
Modified: 2024-02-08 12:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.