jinja2.exceptions.UndefinedError: 'len' is undefined code example Example: jinja len is undefined # use {% var|length %} # or {% var|count %}