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
Request Method: | POST |
---|---|
Request URL: | http://127.0.0.1:8000/admin/movies/genre/add/ |
Django Version: | 2.1 |
Exception Type: | OperationalError |
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 |
Python Executable: | C:\Users\me\AppData\Local\Programs\Python\Python38-32\python.exe |
Python Version: | 3.8.5 |
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.