Por algum motico, o código de criar tabela de estudantes não funciona, e com isso o resto do código também não funciona por referenciar students



import sqlite3
def plugin():
conn = sqlite3.connect('school.db')
return conn
def create_table_students():
conn = plugin()
cursor = conn.cursor()
cursor.execute(
"""
CREATE TABLE IF NOT EXISTS students(
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER,
)
"""
)
conn.commit()
conn.close()
def create_table_enrollment():
conn = plugin()
cursor = conn.cursor()
cursor.execute(
"""
CREATE TABLE IF NOT EXISTS enrollments(
id INTEGER PRIMARY KEY,
name_discipline TEXT,
student_id INTEGER,
FOREIGN KEY (student_id) REFERENCES students(id)
)
"""
)
conn.commit()
conn.close()
def create_student(name, age):
conn = plugin()
cursor = conn.cursor()
cursor.execute(
"""
INSERT INTO students (name, age) \
VALUES (?,?)
""", (name, age)
)
conn.commit()
conn.close()
def list_students():
conn = plugin()
cursor = conn.cursor()
cursor.execute(
"""
SELECT * FROM students
"""
)
students = cursor.fetchall()
for student in students:
print(student)
conn.commit()
conn.close()
O que eu faço?