`no such table: main.catalogue_product__old` when creating a new product
See original GitHub issueHi, I’ve ran into a really strange error which I’m not able to debug. On a fresh django-oscar installation (tested with 1.6.4 and 2.0-dev) I’m getting this when I add new product via the dashboard:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 296, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: main.catalogue_product__old
I guess there is some bug in the migrations? I looked into this quite some time and couldn’t find the problem.
I prepared a minimal example:
In the extracted folder, run the following commands to init the project and get the same error:
# I tried both the system's pip and virtual envs
pip install django-oscar
python manage.py migrate
# sets up superuser "admin" (admin@admin.de) with password "admin"
python manage.py loaddata data/auth.json
# this triggers the error
python manage.py loaddata data/catalogue.json
This bug also appears when creating a new product via the dashboard in both oscar 2.0 and 1.6.4… Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Django - No such table: main.auth_user__old - Stack Overflow
Create the new db.sqlite3 in your root folder. Re-run migrations: python3 manage.py makemigrations python3 manage.py migrate.
Read more >error - no such table - Using Django
I'm trying to make an e-mail authorization and get an error when creating superuser. What's wrong? application 'www' models.py.
Read more >OperatorError no such table : Forums - PythonAnywhere
when I go to my site. I am using sqlite3 and python 2.7. It seems like this is a common error and I...
Read more >subject:"No such Table Error" - The Mail Archive
You're probably right though, if the current database has issues but not the new one, the old one might have somehow been corrupted......
Read more >How to fix the problem no such table: main.auth_user__old?
Here is the error: dpaste.com/0CM2P00 It appears after trying to add any record in the ... are those projects that build from 17...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did this in pycharm and it did work:
pip install Django --upgrade
Then
python manage.py migrate python manage.py makemigrations ‘app_name’ python manage.py migrate
Man I could KISS you! I have spent 14 hours trying to debug this problem with another Django app because after 3 days of writing the web server crashes when trying to write to the database. This crash caused over one hundred exceptions to be thrown and I didn’t even know where on earth to start.
You are an absolute saint! This fixed my problem one hundred percent and I don’t have a single error now. Oh my days! There is a god!