You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Results in the following error: Error: invalid syntax (<string>, line 4)
This is confusing because the error is actually on line 5 (%%ignite does not get counted).
Ideally we want this to be similar to full python error message which shows the position of the syntax error also.
File "<stdin>", line 3
else False:
^
SyntaxError: invalid syntax
Acceptance:
Syntax error message shows correct line number (1 line after started #)
Syntax error message shows the position of where the syntax error starts
unit test(s)
See comments for advice
The text was updated successfully, but these errors were encountered:
A suggestion for implementing this is to use traceback.format_exc() which returns a string with the exception formatted. The file name can be removed and the line number must be incremented by one.
AlphaRLee
changed the title
Improve syntax error messages
Improve syntax and runtime error messages
Nov 24, 2020
Currently the following code:
Results in the following error:
Error: invalid syntax (<string>, line 4)
This is confusing because the error is actually on line 5 (%%ignite does not get counted).
Ideally we want this to be similar to full python error message which shows the position of the syntax error also.
Acceptance:
See comments for advice
The text was updated successfully, but these errors were encountered: