simonw/datasette-lite

Use alter=True when loading rows

simonw opened this issue · 1 comments

simonw commented

Otherwise if a file like https://schedules.ire.org/nicar-2024/nicar-2024-schedule.json has additional keys in later rows you get this error:

  File "/lib/python3.11/site-packages/sqlite_utils/db.py", line 2995, in insert_all
    self.insert_chunk(
  File "/lib/python3.11/site-packages/sqlite_utils/db.py", line 2760, in insert_chunk
    result = self.db.execute(query, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/sqlite_utils/db.py", line 468, in execute
    return self.conn.execute(sql, parameters)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: table raw has no column named multi_day