i tried to insert data into table using python by using following code :
import MySQLdb def Handle_DB_Connection(self): ## Database connection self.db = MySQLdb.connect(host="localhost", user="root", passwd="", db="mydb") self.cur = self.db.cursor()################################## in another defself.cur.execute('''INSERT INTO car_info(car_number,owner_company,branch,service_mode,shaceh_number, motor_number,fuel_type,car_type,car_model,car_load,car_weight,car_shape,car_color) VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)''', (car_number, owner_company, branch, service_mode, shaceh_number,motor_number, fuel_type, car_type, car_model, car_load,car_wight, car_shape, car_color))self.db.commit()
but when i clicked add button it just crash without any information when i comment it it just work nice