-
-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
I'm getting a python TypeError raised when elaborating a .mako file but the Traceback does not tell me what line of the mako file cause it. It looks like this:
Traceback (most recent call last):
File "foo.py", line NN, in elaborate_template
return my_template.render(var=value)
File ".../python3.10/site-packages/mako/template.py", line 438, in render
return runtime._render(self, self.callable_, args, data)
File ".../python3.10/site-packages/mako/runtime.py", line 874, in _render
_render_context(
File ".../python3.10/site-packages/mako/runtime.py", line 916, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File ".../python3.10/site-packages/mako/runtime.py", line 943, in _exec_template
callable_(context, *args, **kwargs)
File "memory:0x7ca7deb88130", line 606, in render_body
File "bar.py", line MM, in __eq__
raise TypeError("Comparison not supported")
TypeError: Comparison not supportedCode at foo.py
my_template = Template(template_file.read())
return my_template.render(var=value)Environment:
- python verstion 3.10.15
mako.__version__ = 1.3.5
Background:
I was changing external python in bar.py and have never had to modify a mako file before. I couldn't find anything in Discussions or Issues when searching for Troubleshoot/Debug/Exception. So any help appreciated.
- Is it possible to
print()from inside the.makoso that it appears on stdout while rendering? - Can I step through the render process with debugger somehow?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels