Nagging problem with MySQLdb

Erik Max Francis max at
Mon Nov 22 02:38:40 CET 2004

Phillip wrote:

> The other wariant I've tried (using a tuple) with
>  >>>>>>
> ...# the same stuff as above and:
> (data01, data02, data03, data04, data05, data06, data07, data08, data09, 
> data10, data11, data12, data13, data14, data15, data16, data17, data18, 
> data19, data20, data21, data22, data23, data24, data25, data26, data27, 
> data28, data29)
> <<<<<<
> returns:
> "TypeError: 'str' object is not callable"

Right now you're just writing the equivalent of

	"%s is %d years old" (name, age)

which is attempting to call a string like a function.  You meant:

	"%s is %d years old" % (name, age)

Erik Max Francis && max at &&
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Have you fell in love with somebody / Who didn't know
   -- Zhane

More information about the Python-list mailing list