I am working on a flask application, using SQLAlchemy and I have four tables I am using. I called up the python shell, imported the db and imported all four of the tables. One of the four is having trouble, and I am not sure why and I keep getting the following error when I run List.query.all():
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: list.name [SQL: u'SELECT list.id AS list_id, list.name AS list_name \nFROM list']
The Model in question:
class List(db.Model):
id = db.Column(db.Integer, primary_key = True)
name = db.Column(db.String(255))
def __init__(self, name):
self.name = name
The other Models are fine, and when I do Model.query.all() return an empty list, it is just this one that keeps throwing the error above. I haven't added anything to it, either. Any suggestions?
Aucun commentaire:
Enregistrer un commentaire