索引器:列表索引超出范围:Python

索引器:列表索引超出范围:Python,python,python-3.x,Python,Python 3.x,我正在尝试在浏览器上运行python脚本,但不断出现此错误。我忽略了什么吗 <!-- The above is a description of an error in a Python program, formatted for a Web browser because the 'cgitb' module was enabled. In case you are not reading this in a Web browser, here is the original t

我正在尝试在浏览器上运行python脚本,但不断出现此错误。我忽略了什么吗

<!-- The above is a description of an error in a Python program, formatted
 for a Web browser because the 'cgitb' module was enabled.  In case you
 are not reading this in a Web browser, here is the original traceback:

app.db.execute
返回了一个空列表。如果出现这样的错误,不要在这里发布,只需检查
cid
是什么(
print(cid)
),这样您就可以查看是否可以访问您试图访问的内容。
File "./index.py", line 50, in &lt;module&gt;
    cid = app.db.execute('select id from clients where status="active" order by id desc limit 1')[0][0]
IndexError: list index out of range