OpenRefine: Python expression preview doesn't always report errors
To Reproduce
- Select “Add Column based on this Column”
- With the expression
cells.a.value.toNumber() - cells.b.value.toNumber(), switch the expression language to Python
Current Results
No error message is displayed, presumably because the response has an “ok” status:
{"code":"ok","results":[{"message":"Traceback (most recent call last):\n File \"<string>\", line 2, in __temp_594255022__\nAttributeError: 'unicode' object has no attribute 'toNumber'\n"}]}
Expected Behavior
The error message should be displayed to the user
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- Addresses #3012 This change will catch a `PySyntaxError` when initializing a new `JythonEvaluable` object and will return the string "Syntax error" instead of the current "Internal error". It is a sm... — committed to SoryRawyer/OpenRefine by SoryRawyer 2 years ago
- Identify syntax errors in Python expressions (#7217) * Addresses #3012 This change will catch a `PySyntaxError` when initializing a new `JythonEvaluable` object and will return the string "Syntax er... — committed to OpenRefine/OpenRefine by SoryRawyer 2 years ago
- Identify syntax errors in Python expressions (#7217) * Addresses #3012 This change will catch a `PySyntaxError` when initializing a new `JythonEvaluable` object and will return the string "Syntax er... — committed to OpenRefine/OpenRefine by SoryRawyer 2 years ago
- Identify syntax errors in Python expressions (#7217) * Addresses #3012 This change will catch a `PySyntaxError` when initializing a new `JythonEvaluable` object and will return the string "Syntax er... — committed to OpenRefine/OpenRefine by SoryRawyer 2 years ago
@antoine2711 see the discussion above: @tfmorris mentioned that the PR did something different and that this problem is still present.