【发布时间】:2020-08-05 00:47:33
【问题描述】:
我不断收到错误“ TypeError:列表索引必须是整数或切片,而不是列表”,我不确定如何修复它我需要更改什么?
@app.route("/browse/<where>")
def collectPage(where):
for item in lostItems:
if item[1] == where:
passedItem = lostItems[item]
return render_template("mainPage.html", collect = Collect, item = passedItem)
【问题讨论】:
-
可以添加
lostItems的内容吗?
标签: python html flask typeerror