You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Template's render() must fail (due to no such argument, for example)
While handling exception, do mako.exceptions.text_error_template().render()
Result:
While trying to display error template, another exception is thrown because byte-strings don't have split().
"''During handling of the above exception, another exception occurred [...snip...] for line in module_source.split("\n"):
TypeError: Type str doesn't support the buffer API''"
Work-Around:
To "fix" this, change line 170 in mako/exceptions.py from:
for line in module_source.split("\n"):
...to...
for line in module_source.decode('utf-8').split("\n"):
I believe 'utf-8' will need to be replaced with something else.
Migrated issue, originally created by Anonymous
Magical combination:
Result:
While trying to display error template, another exception is thrown because byte-strings don't have split().
"''During handling of the above exception, another exception occurred [...snip...] for line in module_source.split("\n"):
TypeError: Type str doesn't support the buffer API''"
Work-Around:
To "fix" this, change line 170 in mako/exceptions.py from:
...to...
I believe 'utf-8' will need to be replaced with something else.
Attachments: my_template.html | mako_bug.py
The text was updated successfully, but these errors were encountered: