# sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: users

- **ID:** `python/flask-sqlalchemy-query-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

数据库表未创建，或模型未正确映射到数据库。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (100% success)
   ```
   from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy(app)
with app.app_context():
    db.create_all()
   ```

## Dead Ends

- **** — 表创建失败，查询仍然会失败 (70% fail)
- **** — 问题不在数据库名称，而是表不存在 (60% fail)
