cmc-csci040 icon indicating copy to clipboard operation
cmc-csci040 copied to clipboard

sqlite3.OperationalError Problem

Open wgalbreath opened this issue 3 years ago • 1 comments

Hi Mike,

I am experiencing this sqlite3.OperationalError in my project.py file that just started happening yesterday (even though my website/code was running fine the previous few days). I don't think I changed anything about my code that might've caused it.

Screen Shot 2021-12-16 at 10 32 24 AM Screen Shot 2021-12-16 at 10 43 35 AM

I am not sure if I should just fix this with a try / except clause but wanted to see your thoughts since we did not have to do that in class. This error has also shown up on the other lines with cur.execute(sql). Please let me know what you think!

Thank you for your help! William

wgalbreath avatar Dec 16 '21 17:12 wgalbreath

The no such table: users line indicates that there has never been a CREATE TABLE users command run on this database file. This would happen if you are loading an empty database file that was not created with db_create.py. The most likely cause of this problem is that your paths are messed up, and you need to cd into the right folder before running your python commands.

mikeizbicki avatar Dec 16 '21 18:12 mikeizbicki