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

Friðrik Már Jónsson fridrik at pyth.net
Thu Jul 9 09:53:29 EDT 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.

Regards,
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