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

html_error_template fails if in the traceback there are non ascii characters #88

Closed
sqlalchemy-bot opened this Issue Jul 7, 2008 · 10 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Jul 7, 2008

Migrated issue, originally created by Anonymous

Attached is a script that reproduces the problem.


Attachments: bug_mako_html_error_template.py | mako_error.py

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 7, 2008

Anonymous wrote:

This is the traceback that results when executing the attached script:

Traceback (most recent call last):
  File "mako_error.py", line 10, in <module>
    body = template.render()
  File "/usr/local/lib/python2.5/site-packages/mako/template.py", line 121, in render
    return runtime._render(self, self.callable_, args, data)
  File "/usr/local/lib/python2.5/site-packages/mako/runtime.py", line 335, in _render
    _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
  File "/usr/local/lib/python2.5/site-packages/mako/runtime.py", line 352, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/local/lib/python2.5/site-packages/mako/runtime.py", line 385, in _exec_template
    callable_(context, *args, **kwargs)
  File "memory:0xb7dd4bacL", line 88, in render_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 12: ordinal not in range(128)
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 8, 2008

Michael Bayer (@zzzeek) wrote:

what solution do you prefer here ? "encoding" parameters that may be sent to html_error_template() ? or a liberal "encoding_errors" setting by default ?

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 8, 2008

Changes by Michael Bayer (@zzzeek):

  • removed labels: caching
  • added labels: runtime
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 8, 2008

Changes by Philip Jenvey (@pjenvey):

  • changed assignee from "zzzeek" to "pjenvey"
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 8, 2008

Philip Jenvey (@pjenvey) wrote:

fixed in 04a09d4

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 8, 2008

Changes by Philip Jenvey (@pjenvey):

  • changed status to closed
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 28, 2008

Anonymous wrote:

The problem seems to be still here.

I have attached another script that reproduces the problem.
The problem also affect text_error_template.

NOTE: I have incurred in this problem with SQLAlchemy + psycopg2; the exception was an IntegrityError after an insert, and one of the values contained non us-ascii characters.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 28, 2008

Changes by Anonymous:

  • changed status to reopened
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jan 21, 2010

Philip Jenvey (@pjenvey) wrote:

that case should be fixed as of cd7fdd8

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jan 21, 2010

Changes by Philip Jenvey (@pjenvey):

  • set milestone to "0.3"
  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment