I am trying to do various things with my database. I've connected and pulled data out and out data in, successfully, no problems. I've been debugging other issues, and then suddenly I can no longer get anything from my database table - I'm getting "OperationalError: no such table: article".
I'm really stumped here - this was working just fine, I was querying the db with no problems and inserting data, etc etc. Then suddenly I'm getting this error. The changes I made immediately before the error started appearing would seem to be totally unrelated - I undid them and still get this error. Here's the start of my script where I'm getting the error:
import sqlite3
database='mydatabase'
db=sqlite3.connect(database)
c=db.cursor()
sql_command='SELECT id FROM article'
idlist=c.execute(sql_command)
I can open that database in SQLite Administrator and verify the table is there. Plus it was working before. I've also tried to verify that the table is in there by:
>>c.execute('select name from sqlite_master where type="table"').fetchall()
[]
so something is really wacky.
I've also tried closing and reopening the db connection and cursor. And closing the Python session. No dice. Help!