← All fixes
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table
#162Error
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: users
Why it happens, and why this works
The database file the app opened doesn't have the table. Either the tables were never created (models not imported before create_all, migrations not run), or a relative SQLite path like sqlite:///app.db points to a different file depending on the working directory, so a fresh empty database gets created.
Fix
1. Create the tables: import your models first, then Base.metadata.create_all(engine). With Flask-SQLAlchemy, inside app.app_context(): db.create_all(). With Alembic: alembic upgrade head (Flask-Migrate: flask db upgrade). 2. Use an absolute path for SQLite so every run opens the same file: sqlite:////abs/path/app.db or build it from Path(__file__).parent. 3. Check for a stray empty .db file created in another folder.
Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
TS18048: 'user' is possibly 'undefined' (after .find or an optional value)
#88error TS18048: 'user' is possibly 'undefined'.
typescriptVerifiedNo reports yet
Supabase update/delete returns no error but changes 0 rows (RLS blocks it silently)
#135supabase.from('table').update(...).eq('id', x) returns { error: null } but nothing changes; data is [] / count 0. Same for delete. No 42501 error is raised.
TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled
#91error TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
typescriptviteVerifiedNo reports yet