Getting this error “Exception Value: no such table: main.auth_user__old” when attempting to add the ‘Comedy’ genre via the web admin interface.
I’m following Mosh’s video 12.9 of Complete Python Mastery. I have followed all his instructions.
Here’s the exact error
" OperationalError at /admin/movies/genre/add/
no such table: main.auth_user__old
|Exception Value:||no such table: main.auth_user__old|
|Exception Location:||C:\Users\me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 296|
|SQLite library version:||3.32.2|
I have attempted all the steps twice. I can add the genre values manually through DB browser, but not through the Django interface.
I have found this help article https://stackoverflow.com/questions/53637182/django-no-such-table-main-auth-user-old
and followed the instructions to:
- delete db.sqlite3
- python manage.py makemigrations
- python manage.py migrate
Still get the same result.
The stackoverflow eludes to a Django old-version incompatibility with newer SQLite. Perhaps that is a problem and Mosh should redo the videos with a newer Django version. Current version of Django is 3.1.1 as of today. In his video 12.9, Mosh’s version of Django requires 2.1. I will test out theory of newer Django version. If anyone has another idea, I’m open to the idea.