I've been trying to get used to using sqlite3 recently and mostly it's been going well. However recently, my database files have started becoming malformed. Is it because I'm not properly closing my connection to the database? I've had this error using both Python and NodeJS and it is starting to concern me.
Here's my code that has the error, I was planning on changing it to add all the DB handling to the db file to make it neater, but I think I'll have to stop the errors from occurring.