TypeError: tuple indices must be integers, not str February 19, 2023 by Tarik Like the error says, row is a tuple, so you can’t do row["pool_number"]. You need to use the index: row[0].