https://bugs.documentfoundation.org/show_bug.cgi?id=143989
ms777 <ms...@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|7.1.5.2 release |7.4.3.2 release Status|RESOLVED |REOPENED CC| |ms...@web.de Resolution|INSUFFICIENTDATA |--- Keywords| |skillPython --- Comment #5 from ms777 <ms...@web.de> --- I can confirm the behavior and have added a simplified test case. A python function taking no parameters and returning a string is called from A2 through this Basic wrapper: function callPython() oScriptProvider = ThisComponent.getScriptProvider() On Error goto ErrorExit: oScript = oScriptProvider.getScript("vnd.sun.star.script:formulaFunction.py$pythonFormulaFunction?language=Python&location=document") if IsNull(oScript) then callPython = "error getting python script: oScript is null" else callPython = oScript.invoke(array(), array(), array()) endif exit function ErrorExit: callPython = "error getting python script: " + chr(10)+chr(13) + Error$ End function When the document is opened, an error occurs. After recalc (Ctrl+Shift+F9) the function works without error The below function in B2 tries to track down the error a bit. It seems like the python function is not yet in the document storage when it is called the first time function findScript() ucb = CreateUnoService("com.sun.star.ucb.UniversalContentBroker", Array("Local", "Office")) identifier = ucb.createContentIdentifier("vnd.sun.star.tdoc:/1/Scripts/python/formulaFunction.py") content = ucb.queryContent(identifier) if IsNull(content) then findScript = "python script not found" else findScript = "python script found" endif End function The behavior is identical on AO 4.1.6 See also https://forum.openoffice.org//en/forum/viewtopic.php?p=532310#p532310 -- You are receiving this mail because: You are the assignee for the bug.