using translatePythonException instead