Older python will break by assuming that : always means a format expression is coming. Move the field value fetch to format_field, and ascertain if some of the expression was shunted to format specification by mistake.