It was due to wrong index used for the COL_NAME_KEYWORD, used by the 'needsQuoting' function. Also, replaced a tab with a space in the generate_keyword.py file. Reported by: Sanket Mehta, Khushboo Vashi