Skip to content

Commit d3498c9

Browse files
committed
Must normalize exception
It's not clear why this changed. the function must be called "under certain circumstances" https://docs.python.org/3.8/c-api/exceptions.html#c.PyErr_NormalizeException Closes #2092
1 parent 7f08506 commit d3498c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/emc/pythonplugin/python_plugin.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ std::string handle_pyerror()
235235
bp::object formatted_list, formatted;
236236

237237
PyErr_Fetch(&exc, &val, &tb);
238+
PyErr_NormalizeException(&exc, &val, &tb);
239+
238240
bp::handle<> hexc(exc), hval(bp::allow_null(val)), htb(bp::allow_null(tb));
239241
bp::object traceback(bp::import("traceback"));
240242
if (!tb) {

0 commit comments

Comments
 (0)