Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jvanasco opened this issue Jul 27, 2021 · 2 comments
Open
Assignees

Comments

@jvanasco
Copy link
Member

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

@sqla-tester
Copy link
Collaborator

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

@bourke bourke self-assigned this Dec 14, 2021
@ShahriarNasseri
Copy link

#333
on a pattern it blame, on get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants