Script editor does not show the error message

Bug #248977 reported by khiraly
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Unassigned

Bug Description

Try to execute the following simple python script:

a = [1, 2, 3]
for i in a
    print a

There is an error (missing ':' at the end of line of 'for').
The error message is:
"Error occurred"

The real error message would be:
"SyntaxError: invalid syntax"

Conclusion:
As for now, the script editor is useless as a simple and built-in python shell.

Environment:
windows xp, inkscape 0.46

Revision history for this message
khiraly (khiraly123) wrote :

Under "script editor" I mean: View->Scripts

Revision history for this message
ishmal (ishmalius) wrote :

khiraly:

We are in the middle of changing from that console to a new/improved/better/etc one. If I try your code,
the new console says something more python-like:

(innermost last):
  (no code object) at line 0
SyntaxError: ('invalid syntax', ('<unknown>', 2, 11, 'for i in a'))

It needs work, but it's a start.

Here is a screen dump from a few weeks ago:

http://inkscape.modevia.com/win32_inkscape_org/scriptconsole.png
http://inkscape.modevia.com/win32_inkscape_org/scriptconsole2.png
http://inkscape.modevia.com/win32_inkscape_org/scriptconsole3.png

Revision history for this message
khiraly (khiraly123) wrote :

Thank you very much!

In this case the bugreport is no longer valid, we could close it.

I assume, if I download a daily windows build, it should be fine, am I right?

Revision history for this message
khiraly (khiraly123) wrote :

Oh, may I suggest, for using fixed width font in the script editor?
Ariel-like font is not much fun for programming.

Revision history for this message
jazzynico (jazzynico) wrote :

Fix confirmed on Windows Vista, rev. 21627.
Thanks!

Changed in inkscape:
importance: Undecided → Low
milestone: none → 0.47
status: New → Fix Committed
ScislaC (scislac)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.