what is the best way to catch the "errors" from the SQLite DB in Python as they are not considered as exceptions in Python.
The error output after I tried an INSERT OR IGNORE statement where a column did not exist in the DB is as follows
('table X has no column named Y,)
if cursor.rowcount != 1:
You can follow the EAFP approach, use regular
INSERT (without the "ignore" part) and catch database errors which you can log:
try: cursor.execute("INSERT INTO ...", params) except sqlite3.Error as err: logger.error(err.message)