Python操作SQLite出现错误

Python操作SQLite出现错误,插入表: no such column:

import sqlite3


conn=sqlite3.connect("test.db")
cursor = conn.cursor()
print ("Open")
while True:
    sno=input('student\'s sno')
    name=input('student\'s name')
    sex=input('student\'s sex')
    height=input('student\'s height')
    weight=input('student\'s weight')
    sql="""insert into students
        (sno,name,sex,height,weight)
        values
        (:st_sno,st_name,st_sex,st_height,st_weight)
        """
    cursor.execute(sql,{'st_sno':sno,'st_name':name,'st_sex':sex,'st_height':height,'st_weight':weight})
    conn.commit()
    count=('Another student?')
    if count[0].lower()=='n':
        break

cursor.close()

出错误为:sqlite3.OperationalError: no such column: st_name
该怎么解决啊?。。。

你可能感兴趣的:(Python)