Skip to content

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

@jvanasco

Description

@jvanasco

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions