sqlalchemy / sqlalchemy/mako

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

Open
#333 2 comments 0 reactions 1 assignee View on GitHub

@bourke is already working on this.

Since Dec 14, 2021.

Dominant language
Python
Stars
459
Forks
90
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.