Project

General

Profile

Actions

Bug #14179

closed

Jinja templating iteration example in the doc is invalid

Added by Félix DALLIDET almost 6 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Documentation
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

I applied the jinja template from the doc and it fails with the following error:

E| error         jinja                     File from a jinja2 templ| /tmp/result        Build file /tmp/result from template /tmp/template could not be repaired
R: Templating error: Traceback (most recent call last):
  File "/var/rudder/cfengine-community/modules/templates/jinja2-templating.py", line 117, in <module>
    main()
  File "/var/rudder/cfengine-community/modules/templates/jinja2-templating.py", line 113, in main
    render(opts, args)
  File "/var/rudder/cfengine-community/modules/templates/jinja2-templating.py", line 92, in render
    output = env.get_template(os.path.basename(template_path)).render(data)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/tmp/template", line 17, in top-level template code
    {% for key, value in vars.variable_prefix.dict_name.properties %}
ValueError: too many values to unpack

Actions

Also available in: Atom PDF