I'd move the closing paren before .format to the end of the whole statement.  It looks like you don't have enough parens.