Why Am I Getting A Column Does Not Exist Error When It Does Exist? I Am Modifying The Flask Tutorial
I have a column named ticker_symbol, but I am getting a error when I run the error that there is no such column. Here is my auth.py code so far. It is similar to the Flask tutorial
Solution 1:
Run the init-db
command again to recreate the database when you change the schema.
$ flask init-db
Alternative execute
Can you please try the following
ticker_symbol = company_database.execute(
'SELECT * FROM ticker_symbols WHERE ticker_symbol=:my_selector',
{"my_selector": ticker_symbol}
).fetchone()
I think that your variable ticker_symbol
causes the problem. See here (Python Doc) and here (sqlite3.OperationalError: no such column:) for details.
Also make sure that you have actually created you table, as pointed out above by a comment.
Post a Comment for "Why Am I Getting A Column Does Not Exist Error When It Does Exist? I Am Modifying The Flask Tutorial"