django.db.utils.OperationalError: no such table: ohai_kit_ohaikitsetting
Closed, ResolvedPublic

Description

I'm trying to instal OHAI Kit as part of a django project, following the instructions.

The installation fails on the first migrate due to this commit. I had to comment this specific url to continue with the installation.

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/management/base.py", line 398, in execute
    self.check()
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
    include_deployment_checks=include_deployment_checks,
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
    new_errors = check(app_configs=app_configs)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    for pattern in resolver.url_patterns:
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/urlresolvers.py", line 417, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "~/Projects/satnogs/ohai/ohai/urls.py", line 9, in <module>
    url(r'^', include('ohai_kit.urls', namespace='ohai_kit')),
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 52, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/ohai_kit/urls.py", line 28, in <module>
    'extra_context':{'touch_emulation':False, 'settings': OhaiKitSetting.load()}}, name='login'),
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/ohai_kit/singleton.py", line 42, in load
    return cls.objects.get()
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/models/query.py", line 381, in get
    num = len(clone)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/models/query.py", line 240, in __len__
    self._fetch_all()
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/models/query.py", line 1074, in _fetch_all
    self._result_cache = list(self.iterator())
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/models/query.py", line 52, in __iter__
    results = compiler.execute_sql()
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 848, in execute_sql
    cursor.execute(sql, params)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/utils.py", line 95, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "~/.virtualenvs/ohai/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 323, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: ohai_kit_ohaikitsetting
comzeradd created this task.Apr 4 2016, 1:51 AM

I forgot to commit the migration file. Thanks for noticing.

I've now pushed it and it should appear and close this task as soon as phabricator decides to parse the commit (working on fixing that phabricator issue now)