Apache OpenOffice (AOO) Bugzilla – Issue 93812
Python error message is misleading
Last modified: 2013-07-30 02:38:35 UTC
In python scripts, call to functions and methods must have parentheses even if there is no argument. This should be known by python programmers, but when you switch among languages such syntax errors are common. Problem is that python produces a message without relation to the real error. Next attachment is a script example (7 lines) Log file (on MS-Windows XP) says: Fri Sep 12 10:10:43 2008 [ERROR] pythonscript.com.sun.star.ucb.ContentCreationException: Unable to create Content! C:\Program Files\OpenOffice.org 2.4\program\pythonscript.py:492 in function getChildNodes() [contents = self.provCtx.sfa.getFolderContents( self.rootUrl, True )] The error message is no more explicit, see second attachment. The line in error in the script is not even provided. I consider this a defect, not an enhancement, because you cannot really develop in python with such poor messages.
Created attachment 56464 [details] Short script where createTextCursor misses parentheses
Created attachment 56465 [details] Error message produced by python
Hi Joerg, could you take this over? Thanks Kay
Reset assignee on issues not touched by assignee in more than 1000 days.