Spyder 遇到内部问题。哪些步骤将重现该问题?

Spyder has encountered an internal problem. What steps will reproduce the problem?

提问人:Hasini 提问时间:11/14/2023 最后编辑:James ZHasini 更新时间:11/14/2023 访问量:28

问:

我的代码没有错误,我在另一台计算机上尝试了相同的代码(它在那里工作),但在我的电脑中没有运行。以下是我的代码的一部分:

import pandas as pd
import mysql.connector 
conn= mysql.connector. connect(host="localhost", password='K#1703@sparks',user="root", database = "Buttercup_brew_cafe")
cur=conn. cursor()
sql = ("SELECT if null (max(Q Code)+1,1) FROM Bill;")
cur. execute( sql )
results = cur.fetchall()
for row in results:
    QCode=row[0]

错误。

enter image description here

我还下载了 mysql 与 python 连接所需的所有软件包,例如、、等(使用 pip)。 谁能帮忙? mysql-connector-pythonmysql-connectorpandasnumpy

pip 连接 mysql-connector-python

评论

0赞 roganjosh 11/14/2023
这是你需要和他们一起解决的问题,这不是一个我们可以回答的一般编程问题
0赞 JHK 11/14/2023
嘿!如果您的代码在另一台计算机上运行,则安装的软件可能有所不同。然后,提供您使用的软件版本会很有帮助。如果你点击,你可能会找到更多关于Spyder崩溃原因的信息。另外:请使用代码围栏来格式化代码以提高可读性。full details
0赞 Hasini 11/15/2023
哦,好吧..我明白了。好吧,谢谢你的帮助!@JHK
0赞 Hasini 11/15/2023
好的,谢谢@roganjosh

答: 暂无答案