sqlite3.OperationalError: no such table: (table name) themes
File "/Users/mio/shiritori-5-21/app.py", line 92, in remind Open an interactive python shell in this frame
c.execute("select theme from themes where id = ?", (theme_id,))
First of all, my error was due to a typo.
Table name from the mes
not only
Database connection db name conn = sqlite3.connect ("service.db ")
Let's also check.
The themes table has already been created properly in service.db.
Help !! sqlite3.OperationalError: no such table: users (English) "You may be using a relative path to a database file without worrying about what your working directory is." "It doesn't matter if they are in the same folder. The relative path is the relative path from the working directory, not the referenced file. Even if the database file doesn't exist, sqlite won't complain about the empty database. Offers." I found the answer.
** Empty database !? ** If the database to connect to is not found, it seems to automatically create a database with that name. Don't complain (do not throw an error). It's strange that I can't find it Certainly there is an empty database in Finder or VScode orz
conn = sqlite3.connect("service.db")
May be wrong. I have a bad feeling here.
conn = sqlite3.connect("servise.db")
servi s e
I'm sorry I misspelled it.
I wanted to leave a note of error resolution! !! !! Be careful because it's common! !! !! !!
Recommended Posts