Django Error – django.db.utils.OperationalError: no such table


Django “no such table” error of death..

I recently encountered this “no such table” error while trying to run makemigrations command on PyCharm.

I dropped database tables related to my app, cleaned django_migrations table for this app, cleared migrations folder as described in this post: Then I ran makemigrations… No such table..

I did lots of googling but none of the solutions I found was applicable to my case. After some inspection of the error messages generated, I found out that one of the forms in my was trying to access a database that I had deleted. I commented out this form’s code and re-run makemigrations command. This time it was successful.

Hope this helps.
Good Luck,