Skip to content

Instantly share code, notes, and snippets.

@LEW21
Created August 27, 2016 23:42
Show Gist options
  • Save LEW21/8cfcf3741481621553e86d7dbc8b240c to your computer and use it in GitHub Desktop.
Save LEW21/8cfcf3741481621553e86d7dbc8b240c to your computer and use it in GitHub Desktop.
(env) [lew21@apollo whyitsux]$ ./manage.py migrate
Traceback (most recent call last):
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py", line 337, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: django_site
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/base.py", line 353, in execute
self.check()
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/base.py", line 385, in check
include_deployment_checks=include_deployment_checks,
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
issues.extend(super(Command, self)._run_checks(**kwargs))
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/management/base.py", line 372, in _run_checks
return checks.run_checks(**kwargs)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/core/checks/urls.py", line 24, in check_resolver
for pattern in resolver.url_patterns:
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/urls/resolvers.py", line 310, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/urls/resolvers.py", line 303, in urlconf_module
return import_module(self.urlconf_name)
File "/home/lew21/WhyItSux/env/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/lew21/WhyItSux/whyitsux/whyitsux/urls.py", line 19, in <module>
import whyitsuxapp.routers
File "/home/lew21/WhyItSux/whyitsux/whyitsuxapp/routers.py", line 3, in <module>
from whyitsuxapp import viewsets
File "/home/lew21/WhyItSux/whyitsux/whyitsuxapp/viewsets.py", line 10, in <module>
class Topics(viewsets.ReadOnlyModelViewSet):
File "/home/lew21/WhyItSux/whyitsux/whyitsuxapp/viewsets.py", line 11, in Topics
queryset = models.Topic.on_site.all()
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/manager.py", line 160, in all
return self.get_queryset()
File "/home/lew21/WhyItSux/whyitsux/whyitsuxapp/managers.py", line 6, in get_queryset
return super().get_queryset().filter(category__sites=Site.objects.get_current())
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/contrib/sites/models.py", line 65, in get_current
return self._get_site_by_id(site_id)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/contrib/sites/models.py", line 35, in _get_site_by_id
site = self.get(pk=site_id)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/query.py", line 379, in get
num = len(clone)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/query.py", line 238, in __len__
self._fetch_all()
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/query.py", line 1085, in _fetch_all
self._result_cache = list(self.iterator())
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/query.py", line 54, in __iter__
results = compiler.execute_sql()
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 835, in execute_sql
cursor.execute(sql, params)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/lew21/WhyItSux/env/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py", line 337, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: django_site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment