-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Expected Behavior
The macro call should render correctly.
Actual Behavior
The macro call is rendered as a coroutine object repr (<coroutine object macro at 0x10ce50728>).
Python Code
import asyncio
from jinja2 import Template
loop = asyncio.get_event_loop()
async def main():
print(await render())
async def render():
t = Template('{% macro foo(x) %}{{ x }}{% endmacro %}{{ foo(42) }}',
enable_async=True, autoescape=True)
return await t.render_async()
loop.run_until_complete(main())Full Traceback
/Users/mohamed/.virtualenvs/item.tf/lib/python3.6/site-packages/jinja2/runtime.py:501: RuntimeWarning: coroutine 'macro' was never awaited
rv = Markup(rv)Your Environment
- Python version: 3.6
- Jinja version: 2.9.4
Metadata
Metadata
Assignees
Labels
No labels