TypeError: tuple indices must be integers, not str

后端 未结 5 519
孤街浪徒
孤街浪徒 2021-02-01 13:31

I am trying to pull data from a database and assign them to different lists. This specific error is giving me a lot of trouble \"TypeError: tuple indices must be integers, not s

5条回答
  •  北海茫月
    2021-02-01 14:37

    Like the error says, row is a tuple, so you can't do row["pool_number"]. You need to use the index: row[0].

提交回复
热议问题