gett error message: "TypeError: 'int' object is not callable"

Friðrik Már Jónsson fridrik at
Thu Jul 9 15:53:29 CEST 2009

Look at:

   len = len(text)

You're overriding `len` (a built-in method), with an integer  
(`len(text)`).  You then call:

   for i in range(len(fields)):

But `len` is no longer a callable, but merely an integer.

Friðrik Már

P.S. While this is a fairly obvious problem it's usually a good idea  
to post working code and a traceback when requesting help.

More information about the Python-list mailing list