Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: post

What I have tried:

Well I haven't tried anything yet as I do not know in what direction to proceed to solve this error.
Posted
Updated 8-Feb-23 3:01am
Comments
Richard MacCutchan 8-Feb-23 8:55am    
Look at the final error message.

1 solution

Look at the code around line 736. You seem to be setting up a SQL query and your statement is not correct because there is "no such table: post" in your database.
 
Share this answer
 
Comments
Aalam Pratap Bedi 22-Feb-23 8:26am    
@Dave Kreskowiak then how do I solve this error?
Dave Kreskowiak 22-Feb-23 8:36am    
Read my post again.

How can any tell you how to fix your code when you never showed your code? On top of that what is the correct table name you're trying to run an SQL statement against, because it's not "post".
Aalam Pratap Bedi 22-Feb-23 8:48am    
@ Dave Kreskowiak what part of code should I share, so that you can help me out?
Dave Kreskowiak 22-Feb-23 8:49am    
Sigh. Did you read my post AT ALL? Look at the error messages you posted. What are the line numbers in those error messages? You post the code around those line numbers!
Aalam Pratap Bedi 22-Feb-23 8:56am    
YES! Why?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900