Got the following error in Kolibri today:

Hi @cjackson,

Thank you for sending me your database file. For the sqlite3.OperationalError: Could not decode to UTF-8 column error, I believe it is due to corrupted data. Could you please follow the steps below to see if it helps fix the error? I have tested the steps locally.

  1. make a copy of your database file ~/.kolibri/db.sqlite3 somewhere
  2. in the terminal, run sqlite3 db.sqlite3 .dump > dump_all.sql
  3. open the file dump_all.sql with an text editor
  4. in the file dump_all.sql, search for INSERT INTO logger_attemptlog VALUES(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);. There should be two such lines in the file
  5. delete these two lines
  6. go to the bottom of the file dump_all.sql, you will see a line ROLLBACK; -- due to errors. replace this line with COMMIT;
  7. save the edited file
  8. in your terminal, run the command cat dump_all.sql | sqlite3 fixed.db
  9. run the command cp fixed.db ~/.kolibri/db.sqlite3
  10. run the command kolibri manage dbbackup

If you don’t see errors after running the last step, you should be able to run any kolibri commands you would like without getting the initial error. If you still see errors, please feel free to let me know. Thank you!