Issue 93812 - Python error message is misleading
Summary: Python error message is misleading
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-12 09:30 UTC by bmarcelly
Modified: 2013-07-30 02:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Short script where createTextCursor misses parentheses (247 bytes, text/plain)
2008-09-12 09:32 UTC, bmarcelly
no flags Details
Error message produced by python (5.13 KB, image/png)
2008-09-12 09:33 UTC, bmarcelly
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description bmarcelly 2008-09-12 09:30:36 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.
Comment 1 bmarcelly 2008-09-12 09:32:35 UTC
Created attachment 56464 [details]
Short script where createTextCursor misses parentheses
Comment 2 bmarcelly 2008-09-12 09:33:38 UTC
Created attachment 56465 [details]
Error message produced by python
Comment 3 kay.ramme 2008-09-15 08:43:38 UTC
Hi Joerg, could you take this over? 

Thanks

     Kay
Comment 4 Rob Weir 2013-07-30 02:38:35 UTC
Reset assignee on issues not touched by assignee in more than 1000 days.