Jim Carroll <j...@carroll.com> added the comment:
This patch solves the issue diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index c3f30c9339..d265021f75 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -2782,6 +2782,7 @@ treebuilder_handle_start(TreeBuilderObject* self, PyObject* tag, st->parseerror_obj, "multiple elements on top level" ); + PyErr_SyntaxLocationEx("xml.etree.ElementTree", 0, 0); goto error; } Py_INCREF(node); @@ -3267,6 +3268,7 @@ expat_set_error(enum XML_Error error_code, Py_ssize_t line, Py_ssize_t column, Py_DECREF(position); PyErr_SetObject(st->parseerror_obj, error); + PyErr_SyntaxLocationEx("xml.etree.ElementTree", (int)line, (int)column); Py_DECREF(error); } ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38611> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com