Control structure parsing fails on DOS/Windows carriage returns.
Taken from the docs (with Windows/DOS end-of-line formatting):
% if x==5:\r\n this is some output\r\n % endif\r\n
This causes an exception in the templating engine. However, UNIX style end-of-lines (newline without a carriage return) work fine:
% if x==5:\n this is some output\n % endif\n
I discovered this problem when creating the template on my Windows workstation and then SFTPing it to the server. My editor allows me to strip out the CRs when saving, but simplier Windows-based editors (like Notepad) won't be able to do this.