id summary reporter owner description type status priority milestone component version resolution keywords cc 60 """TypeError: iteration over non-sequence"" in py:for instead of an error" s.lipnevich@… cmlenz "The fragment {{{
}}} fails if `c.items` is a valid instance but not an ''iterable'' (happens for me when using Genshi with Pylons). The failure is expected, but I suppose Genshi could provide a better error message that shows line and column where this happens. Here's the tail of a sample trace: {{{ File ""/usr/lib/python2.4/site-packages/Pylons-0.9.2-py2.4.egg/pylons/templating.py"", line 288, in render_response response = pylons.Response(render(*args, **kargs)) File ""/usr/lib/python2.4/site-packages/Pylons-0.9.2-py2.4.egg/pylons/templating.py"", line 273, in render namespace=kargs, **cache_args) File ""/usr/lib/python2.4/site-packages/Pylons-0.9.2-py2.4.egg/pylons/templating.py"", line 196, in render return engine_config['engine'].render(namespace, template=full_path, **options) File ""build/bdist.linux-x86_64/egg/genshi/plugin.py"", line 74, in render File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 141, in render File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 329, in __call__ File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 485, in __call__ File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 433, in __call__ File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 202, in _ensure File ""build/bdist.linux-x86_64/egg/genshi/filters.py"", line 147, in __call__ File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 1101, in _match File ""build/bdist.linux-x86_64/egg/genshi/filters.py"", line 147, in __call__ File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 1076, in _match File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 1065, in _strip File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 859, in _eval File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 917, in _flatten File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 917, in _flatten File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 911, in _flatten File ""build/bdist.linux-x86_64/egg/genshi/template.py"", line 428, in __call__ TypeError: iteration over non-sequence }}}" defect closed minor 0.3.2 Template processing 0.3.1 fixed