First time here? Check out the FAQ!

Problem with syncdb (KeyError: 'default')

Hello, I'm new to askbot but I'm trying to mirror a setup we (my company) already has here and I run into a problem with the 'python syncdb' command. By mirror I mean we have a system running the same setup and I'm just trying to duplicate it from scratch on a new machine. My setup is:
CentOS5 (yeah, I know)
askbot 0.7.20
django 1.1.4
postgresql 8.3.18
python 2.6.5
Everything is installed in a virtualenv /home/user/askbot-install/bin and I ran askbot-setup pointing to /home/user/askbot-install/deploy. The output from the syncdb attempt I get is below. I tried removing/changing the ADMIN_MEDIA_PREFIX but then it just skips that warning. I feel like I'm missing something dumb. thoughts? Thanks.

python syncdb
/home/postgres/askbot-install/lib/python2.6/site-packages/django/conf/ DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
/home/postgres/askbot-install/lib/python2.6/site-packages/django/core/cache/ DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead.
Traceback (most recent call last):
  File "", line 11, in <module>
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/django/core/management/", line 459, in execute_manager
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/django/core/management/", line 382, in execute
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/django/core/management/", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/django/core/management/", line 69, in load_command_class
    module = import_module('' % (app_name, name))
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/django/utils/", line 35, in import_module
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/south/management/commands/", line 13, in <module>
    from import Command as SyncCommand
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/south/management/commands/", line 17, in <module>
    from south.db import dbs
  File "/home/postgres/askbot-install/lib/python2.6/site-packages/south/db/", line 78, in <module>
    db = dbs[DEFAULT_DB_ALIAS]
KeyError: 'default'

aaronmorse's avatar
asked 2012-04-05 15:36:48 -0500
Evgeny's avatar
updated 2012-04-05 16:26:59 -0500
edit flag offensive 0 remove flag close merge delete


I think your cloning was not perfect, there must be different versions of libraries, possibly django.

Evgeny's avatar Evgeny (2012-04-05 16:47:45 -0500) edit
add a comment see more comments

1 Answer


Not sure what is the cause of this. Maybe your version of django is 1.4.x? With django 1.4 format of settings for the database is a bit different.

I'll try to make a release today that fixes django version to 1.3 until we change the settings style, but you could try just downgrading of django.

Evgeny's avatar
answered 2012-04-05 16:25:09 -0500
edit flag offensive 0 remove flag delete link


Great, thanks. As it turns out I am actually using django 1.4. I thought I was running 1.1.x. Python 2.6.5 (r265:79063, Feb 28 2011, 21:55:56) [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import django >>> django.VERSION (1, 4, 0, 'final', 0) >>>

aaronmorse's avatar aaronmorse (2012-04-06 04:04:19 -0500) edit

Downgrading to django 1.2 allowed the syncdb to get further. I'm now getting a "relation "askbot_emailfeedsetting" does not exist" error after setting up the superuser but I'll look into that. Thanks for the help.

aaronmorse's avatar aaronmorse (2012-04-06 07:30:15 -0500) edit

Try starting with a blank database.

Evgeny's avatar Evgeny (2012-04-06 09:51:46 -0500) edit
add a comment see more comments