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

68 views Asked by At

My code has no errors, I tried this same code on a different computer (it worked there) but here in my pc it isn't running. the following is a part of my code:

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]

the error.

enter image description here

I've also downloaded all the necessary packages for mysql connectivity with python such as mysql-connector-python, mysql-connector, pandas, numpy etc (using pip). Can anyone help?

0

There are 0 answers