привет я хочу вставить в данные в sqlite данные не вставляются. сообщение об ошибке
МОЯ функция внутри кода
def addstudent(self):
b2 = self.a2.text()
b3 = self.a3.text()
b4 = self.a4.text()
b5 = self.a5.text()
b6 = self.a6.text()
b7 = self.a7.text()
b8 = self.a8.text()
b9 = self.a9.itemText(self.a9.currentIndex())
b10 = self.a10.itemText(self.a10.currentIndex())
b11 = self.a11.itemText(self.a11.currentIndex())
b12 = self.a12.text()
b13 = self.a13.itemText(self.a13.currentIndex())
b14 = self.a14.itemText(self.a14.currentIndex())
b15 = self.a15.text()
b16 = self.a16.itemText(self.a16.currentIndex())
try:
conn = sqlite3.connect("collage_App.db")
dbs = conn.cursor()
dbs.execute("""INSERT INTO student_registration VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, , ?, ?) """ , (b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16, arrow.now().format('YYYY-MM-DD')) )
conn.commit()
conn.close()
QMessageBox.information(QMessageBox(),'Successful','Student is added successfully into database.')
self.close()
except Exception:
QMessageBox.warning(QMessageBox(), 'Error', 'Could not add student to the database.')
Моя кнопка Код события
#Submit Button Clicked
self.add.clicked.connect(self.addstudent)