mako icon indicating copy to clipboard operation
mako copied to clipboard

on render, encoding issues do not show which line caused the Exception

Open jvanasco opened this issue 4 years ago • 2 comments

If a template is opened with incompatible encoding (such as unicode text but no UTF-8 identification on PY2, or potential encoding mismatches on PY3), a Unicode error will be raised that notes the offending character position but no line is identified.

A potential way to address this is to return a mako.exceptions.RuntimeException that includes the debug information and the original exception.

see https://github.com/sqlalchemy/mako/blob/master/mako/util.py#L169

jvanasco avatar Jul 27 '21 20:07 jvanasco

Michael Bourke has proposed a fix for this issue in the main branch:

Capture more info for template RuntimeExceptions https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/3406

sqla-tester avatar Dec 13 '21 01:12 sqla-tester

https://github.com/sqlalchemy/mako/issues/333 on a pattern it blame, on get

ShahriarNasseri avatar Mar 07 '23 12:03 ShahriarNasseri