python-docx-template: Jinja’builtin_function_or_method’ object is not iterable

error:

File “C:\Python27\lib\site-packages\jinja2\environment.py”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “C:\Python27\lib\site-packages\jinja2\environment.py”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “<template>”, line 1, in top-level template code
TypeError: ‘builtin_function_or_method’ object is not iterable

Check that the keywords values etc. are used in the template references

{%tc for col in report.threat_score.weeks %} {{col}} {%tc endfor %}
{%tc for col in report.threat_score.values %} {{col}} {%tc endfor %}
{%tc for col in report.threat_score.values %}

Similar Posts: