sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user [SQL: 'INSERT INTO user (username, email, image_file, address, password) VALUES (?, ?, ?, ?, ?)'] [parameters: ('bruce', 'faal@hotmail.com', 'default.jpg', 'Kigali', '$2b$12$.sjPnuLK66XS6v0nWbNAteG45IJXxQhIC9SfGlEXbmCXITbEOMHWC')] (Background on this error at: http://sqlalche.me/e/e3q8)
Opened this issue · 2 comments
RutembesaBruceFaal commented
@CoreyMSchafer Kinddly help me to solve this issue i am not finding where is the issue. I am learning Flask_Blog tutorial
Thank you
Kshitijpawar commented
@RutembesaBruceFaal
It says no such table as User. Have you tried creating the appropriate table as show in the tutorials
1.) open python shell
2.) from flaskblog import db
from flaskblog.models import User, Post, etc #all the tables required
3.)db.create_all()
saranpan commented
I have been stucked this problem too,
thanks to @Kshitijpawar to point out that I forgot to launch the db yet (so, db.create_all() is all you need)