Can't Encode Pic

Carsten Haese carsten.haese at gmail.com
Thu Nov 26 13:52:45 EST 2009


Victor Subervi wrote:
> Hang on. Not done yet. The line of code I gave you was just a test case.
> The real ones, and the error they threw, follows:
> [...]
>    73         cursor.execute(sql, (MySQLdb.Binary(pics[id]),))
> [...]
> 
> TypeError: list indices must be integers
>       args = ('list indices must be integers',)
> 
> Please advise,

I know the answer, but I'm not going to spoon-feed it to you this time,
since even a mediocre programmer should be able to figure this one out,
and you really need to start thinking for yourself if you ever want to
grow as a programmer.

How much time did you spend trying to figure out what that error message
is telling you? What thought processes, if any, have you followed?

--
Carsten Haese
http://informixdb.sourceforge.net




More information about the Python-list mailing list