Error: 500 Internal Server Error on execute import Root cause: Using fetchone()[0] with RealDictCursor (dict-like rows) PostgreSQL RealDictCursor returns dict-like objects, not tuples. Accessing [0] on a dict throws TypeError. Fix: Changed all fetchone()[0] to fetchone()['id'] Locations: - Line 163: log_id after INSERT INTO wiki_import_log - Line 485: ex_id after INSERT INTO exercises - Line 599: skill_id after INSERT INTO skills - Line 616: method_id after INSERT INTO training_methods This matches the pattern used in other routers (exercises.py, etc.) |
||
|---|---|---|
| .. | ||
| migrations | ||
| routers | ||
| auth.py | ||
| db_init.py | ||
| db.py | ||
| Dockerfile | ||
| main.py | ||
| models.py | ||
| requirements.txt | ||
| run_migrations.py | ||
| smw_client.py | ||
| smw_mapper.py | ||
| version.py | ||