Error message is confusing if <py:for ...> lacks each=""
|Reported by:||brandon@…||Owned by:||cmlenz|
I probably use too many templating languages, but a few minutes ago I wrote this when using Genshi:
<py:for loop="item in mylist">
and was greeted with the perplexing error message "TypeError?: argument of type 'NoneType?' is not iterable". This was rather bewildering and it took several minutes for me to work out what was going wrong. It seems that the error message is, instead of pointing out the actual error, leaking an internal detail about how Genshi works: when it asks itself what value I supplied for each="", it gets back the answer None if I failed to specify each="".
Could the error message be re-worded to something like: "py:for is missing each="" attribute" or something?
That would point users at the solution much more effectively.