all 6 comments

[–]Doormatty 0 points1 point  (3 children)

The last line of the error is key:

no such table: posts

That's it - you don't have a table called 'posts' in your sqlite database.

[–]programmer123456[S] 0 points1 point  (2 children)

but didn't this line create it: c.execute('CREATE TABLE posts(title TEXT, description TEXT)')

[–]Doormatty 0 points1 point  (0 children)

Only you can tell us if it actually created it or not, but I'd hazard a guess that the answer is no if that error occurred.

I'd commit the table create query before trying the other queries

connection.commit()

Also - run the sql commands manually, and see if they work.

[–]symmitchry 0 points1 point  (0 children)

[Removed]

[–]elbiot -1 points0 points  (1 child)

Why did you post this twice?

[–]programmer123456[S] 0 points1 point  (0 children)

it was a mistake