gpt4 book ai didi

python - 发现错误 : Statement expected, py: Dedent

转载 作者:行者123 更新时间:2023-12-04 13:51:54 31 4
gpt4 key购买 nike

我们愿意/被迫为大学开发一个小型网络应用程序。现在我们开始了,一切似乎都很好,直到出现上述奇怪的错误。

Statement expected, found py: Dedent


该错误由以下代码行引发:
def get_reset_token(self, mysql, userid):
try:
conn = mysql.connect()
cursor = conn.cursor()
cursor.execute("""SELECT token FROM tralala_reset_password
WHERE uid=(%s)""", userid)
data = cursor.fetchall()
cursor.close()
conn.close()
return data[0]
except Exception as e:
app.logger(str(e))
return ""
PyCharm 开始标记 return ""陈述。

最佳答案

通过忽略错误解决了问题。复制到另一个编辑器,这里什么也没有。所以似乎是 PyCharm 的错误。

关于python - 发现错误 : Statement expected, py: Dedent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68568785/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com