Cannot Install Fixture: file is encrypted or is not a database - python

I'm working on a website which allows users to nominate and vote for different positions. I use Python 2.7 and Django 1.10. The position objects were added through django's admin interface on the actual server. Therefore, my local server is empty of any positions. I wanted to add the positions to my local server for the sake of development. I ran the command python manage.py dumpdata voting.Position --=2 > voting/fixtures/default_positions.json.
The fixture has been made, and now I want to loaddata. When I run python manage.py loaddata voting/fixtures/default_positions.json (on my local dir. not the website's/server's one), I get the following error:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 356, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 64, in handle
self.loaddata(fixture_labels)
File "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 104, in loaddata
self.load_label(fixture_label)
File "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 167, in load_label
obj.save(using=self.using)
File "/usr/lib/python2.7/site-packages/django/core/serializers/base.py", line 201, in save
models.Model.save_base(self.object, using=using, raw=True, **kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 824, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 889, in _save_table
forced_update)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 939, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 652, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1148, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 835, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 337, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: Problem installing fixture '/home/Saleha/trabd/voting/fixtures/default_positions.json': Could not load voting.Position(pk=1): file is encrypted or is not a database
The fixture file: https://pastebin.com/avRzHQyf (too long for this place)
I need to say, as well, that python manage.py runserver doesn't work, nor does python manage.py makemigrations; and all that happens is that this same error pops up.
If no solution, could someone at least guide me to how to undo the loaddata command, so at least I can get my local server running I again?
I apologize for the long introduction, but I'm relatively new to programming and thought I should explain as much as I can. My error could be in the simplest and silliest of places.
Any help is appreciated. Thank you in advance.

Related

Django python manage.py makemigrations causes a problem with databases

I am starting with Django and I got this problem. I understand only that there is a problem with database. I would really like to get some help. Thank you, If it is important I use Fedora 33
Guys really, not my bad that the 90% of problem is code, let me as a question XD
(project_venv) [mikolajwojtowicz#localhost src]$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 411, in execute
return Database.Cursor.execute(self, query)
sqlite3.DatabaseError: file is not a database
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mikolajwojtowicz/Django/my_project/src/manage.py", line 22, in <module>
main()
File "/home/mikolajwojtowicz/Django/my_project/src/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/core/management/base.py", line 85, in wrapped
res = handle_func(*args, **kwargs)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/core/management/commands/makemigrations.py", line 101, in handle
loader.check_consistent_history(connection)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/migrations/loader.py", line 290, in check_consistent_history
applied = recorder.applied_migrations()
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
if self.has_table():
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 56, in has_table
tables = self.connection.introspection.table_names(cursor)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/base/introspection.py", line 48, in table_names
return get_names(cursor)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/base/introspection.py", line 43, in get_names
return sorted(ti.name for ti in self.get_table_list(cursor)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/sqlite3/introspection.py", line 74, in get_table_list
cursor.execute("""
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/home/mikolajwojtowicz/.local/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 411, in execute
return Database.Cursor.execute(self, query)
django.db.utils.DatabaseError: file is not a database
The error log says:
sqlite3.DatabaseError: file is not a database
This means that your settings for the database are wrong. This setting is located in the settings.py in your core project's directory (this directory will also have wsgi.py and asgi.py)
Make sure your settings for db engine, name, user, and password are correct

sqlite3.OperationalError: no such table: django_site__old

I'm trying to make a webpage using python and mezzanine as its cms.
but I got this error after successfully creating Superuser:
Superuser created successfully.
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\django\db\backends\utils.py", line 62, in execute
return self.cursor.execute(sql)
File "C:\Python39\lib\site-packages\django\db\backends\sqlite3\base.py", line 326, in execute
return Database.Cursor.execute(self, query)
sqlite3.OperationalError: no such table: django_site__old
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\annie\Documents\DMCproject\manage.py", line 14, in <module>
execute_from_command_line(sys.argv)
File "C:\Python39\lib\site-packages\django\core\management\__init__.py", line 364, in execute_from_command_line
utility.execute()
File "C:\Python39\lib\site-packages\django\core\management\__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python39\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Python39\lib\site-packages\django\core\management\base.py", line 330, in execute
output = self.handle(*args, **options)
File "C:\Python39\lib\site-packages\mezzanine\core\management\commands\createdb.py", line 61, in handle
func()
File "C:\Python39\lib\site-packages\mezzanine\core\management\commands\createdb.py", line 109, in create_pages
call_command("loaddata", "mezzanine_required.json")
File "C:\Python39\lib\site-packages\django\core\management\__init__.py", line 131, in call_command
return command.execute(*args, **defaults)
File "C:\Python39\lib\site-packages\django\core\management\base.py", line 330, in execute
output = self.handle(*args, **options)
File "C:\Python39\lib\site-packages\django\core\management\commands\loaddata.py", line 69, in handle
self.loaddata(fixture_labels)
File "C:\Python39\lib\site-packages\django\core\management\commands\loaddata.py", line 115, in loaddata
connection.check_constraints(table_names=table_names)
File "C:\Python39\lib\site-packages\django\db\backends\sqlite3\base.py", line 276, in check_constraints
cursor.execute(
File "C:\Python39\lib\site-packages\django\db\backends\utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "C:\Python39\lib\site-packages\django\db\backends\utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "C:\Python39\lib\site-packages\django\db\utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Python39\lib\site-packages\django\utils\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Python39\lib\site-packages\django\db\backends\utils.py", line 62, in execute
return self.cursor.execute(sql)
File "C:\Python39\lib\site-packages\django\db\backends\sqlite3\base.py", line 326, in execute
return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: Problem installing fixtures: no such table: django_site__old
This is related to this issue in Django: https://code.djangoproject.com/ticket/29182.
It is caused by a new behavior introduced in sqlite 3.26.
Django has patched it in latest 2.0 and 2.1, but mezzanine does not support Django 2 yet.
The easiest fix is to not use sqlite - switch to postgres, mysql, etc. Alternatively, downgrade sqlite to < 3.26
https://github.com/stephenmcd/mezzanine/issues/1910
I had the same issue in a github action and I had to tweak the ubuntu version to get the preinstalled sqlite version that would work. What fixed the issue for me was to change this line:
runs-on: ubuntu-latest
to
runs-on: ubuntu-18.04
Got the ubuntu version containing the sqlite version I needed here: https://packages.ubuntu.com/search?keywords=sqlite3.

Django all-auth testing error - django.db.utils.OperationalError: no such table: socialaccount_openidstore

can anyone help with this Django allauth issue? I'm running Django 1.8 with Python 3 in a virtualenv. I've got allauth installed and working OK in my project but I get an error message when I try and run any tests. Here is the simplest replication of the error I can get:
I create a new project, then download the django-allauth .zip file and copy the allauth directory into my project directory. I add the following apps to INSTALLED_APPS in settings:
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
then run python manage.py migrate. So far so good, but when I run python manage.py test I get the following error:
Traceback (most recent call last):
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/sqlite3/base.py", line 318, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: socialaccount_openidstore
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/test/runner.py", line 210, in run_tests
old_config = self.setup_databases()
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/test/runner.py", line 166, in setup_databases
**kwargs
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/test/runner.py", line 370, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/base/creation.py", line 376, in create_test_db
self.connection._test_serialized_contents = self.serialize_db_to_string()
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/base/creation.py", line 413, in serialize_db_to_string
serializers.serialize("json", get_objects(), indent=None, stream=out)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/serializers/__init__.py", line 129, in serialize
s.serialize(queryset, **options)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/core/serializers/base.py", line 52, in serialize
for obj in queryset:
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/base/creation.py", line 409, in get_objects
for obj in queryset.iterator():
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/models/query.py", line 238, in iterator
results = compiler.execute_sql()
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/models/sql/compiler.py", line 829, in execute_sql
cursor.execute(sql, params)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/utils.py", line 97, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/utils/six.py", line 658, in reraise
raise value.with_traceback(tb)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/Users/AGG/Dropbox/env/lib/python3.4/site-packages/django/db/backends/sqlite3/base.py", line 318, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: socialaccount_openidstore
I've tried deleting the database or project and starting again. I can't find this issue elsewhere on StackOverflow. Extra information: the error goes away if I delete the tests files in allauth or comment out 'allauth.socialaccount' in INSTALLED_APPS. I'm very confused about the "openidstore" table - is it something to do with the migrations in allauth/socialaccount/providers/openid?
Add 'allauth.socialaccount.providers.openid' to INSTALLED_APPS
manage.py makemigrations
manage.py migrate
That solved it for me.
I've succeeded with these lines to INSTALLED_APPS.
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.openid',

Django Upgrade : relation "django_content type" does not exist

I upgraded my django version from 1.7.5 to 1.9.2. All migration ran but when i run tests i get below error.
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I checked the database and the django_content_type model exists. I am using PostgreSQL.
I am only getting this error on PostgreSQL not in Sqlite3..
Traceback
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_manage.py", line 129, in
utility.execute()
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_manage.py", line 104, in execute
PycharmTestCommand().run_from_argv(self.argv)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_manage.py", line 91, in handle
failures = TestRunner(test_labels, verbosity=verbosity, interactive=interactive, failfast=failfast, keepdb='--keepdb' in sys.argv)
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_runner.py", line 256, in run_tests
extra_tests=extra_tests, **options)
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_runner.py", line 156, in run_tests
return super(DjangoTeamcityTestRunner, self).run_tests(test_labels, extra_tests, **kwargs)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/test/runner.py", line 532, in run_tests
old_config = self.setup_databases()
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/test/runner.py", line 482, in setup_databases
self.parallel, **kwargs
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/test/runner.py", line 726, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 70, in create_test_db
run_syncdb=True,
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/__init__.py", line 119, in call_command
return command.execute(*args, **defaults)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 172, in handle
self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 293, in sync_apps
cursor.execute(statement)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/db/utils.py", line 95, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/Mac/my_env_test/lib/python2.7/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I used uuid field and JSON field in old Django version but in new version these fields are default provided by django models. So i replaced these fields with django default fields and created migrations again....
Now Its working without any issue..

django.db.utils.OperationalError: (1426, "Too big precision 1000

I get the folling problem when I try to run python2.7 manage.py syncdb on webfaction. Apologies if I am not providing the right info as I am very new to this.
Creating table carts_cartitem
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/base.py", line 533, in handle
return self.handle_noargs(**options)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/commands/syncdb.py", line 27, in handle_noargs
call_command("migrate", **options)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/__init__.py", line 115, in call_command
return klass.execute(*args, **defaults)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/commands/migrate.py", line 128, in handle
created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/core/management/commands/migrate.py", line 239, in sync_apps
cursor.execute(statement)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/db/backends/utils.py", line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/db/backends/utils.py", line 63, in execute
return self.cursor.execute(sql)
File "/home/user/webapps/myproject/lib/python2.7/Django-1.7.1-py2.7.egg/django/db/backends/mysql/base.py", line 128, in execute
return self.cursor.execute(query, args)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.OperationalError: (1426, "Too big precision 1000 specified for column 'line_total'. Maximum is 65.")
Please excuse my lack of knowledge here, I seemed to have solved this by running python manage.py migrate --fake and now I am no longer getting any of the previous errors.

Categories