Hi,

I was able to fix the problem by applying the patch here:

https://bitbucket.org/andrewgodwin/south/pull-requests/86/fixing-the-keyerror-default-when-managerpy/diff

Thanks,
Lianghong


On Monday, October 19, 2015 at 12:44:33 PM UTC-4, James Schneider wrote:
>
> The version of Django you are running has not been supported for quite a 
> while, you should update your Django installation to 1.7 or 1.8. There may 
> be a compatibility issue if you have a new version of the plugin but an old 
> Django installation.
>
> You should also look to see if there is a support ticket queue for the 
> MongoDB app you are using since Django doesn't support it out of the box. I 
> doubt you'll get much help here for an unsupported Django version, 
> especially since you are trying to integrate with a heavy third-party 
> package.
>
> -James
> On Oct 19, 2015 9:14 AM, "Lianghong Xu" <[email protected] <javascript:>> 
> wrote:
>
>> Hi,
>>
>> I'm new to django. I would like to use MongoDB as my backend engine and 
>> installed all required packages for a MongoDB setup. However, when I run 
>> "python manage.py syncdb", I get the following error message:
>>
>> (mywiki)lianghon@172-19-151-114:~/repo/mywiki/testwiki$ python manage.py 
>> syncdb
>>
>> Traceback (most recent call last):
>>
>>   File "manage.py", line 10, in <module>
>>
>>     execute_from_command_line(sys.argv)
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>  
>> line 399, in execute_from_command_line
>>
>>     utility.execute()
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>  
>> line 392, in execute
>>
>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>  
>> line 272, in fetch_command
>>
>>     klass = load_command_class(app_name, subcommand)
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>  
>> line 75, in load_command_class
>>
>>     module = import_module('%s.management.commands.%s' % (app_name, name))
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/django/utils/importlib.py",
>>  
>> line 40, in import_module
>>
>>     __import__(name)
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/south/management/commands/__init__.py",
>>  
>> line 13, in <module>
>>
>>     from south.management.commands.syncdb import Command as SyncCommand
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/south/management/commands/syncdb.py",
>>  
>> line 19, in <module>
>>
>>     from south.db import dbs
>>
>>   File 
>> "/h/lianghon/repo/mywiki/mywiki/local/lib/python2.7/site-packages/south/db/__init__.py",
>>  
>> line 84, in <module>
>>
>>     db = dbs[DEFAULT_DB_ALIAS]
>>
>> KeyError: 'default'
>>
>>
>>
>> I've searched a lot on the Internet on this problem and most answers are 
>> like this: 
>>
>> "You don't have correct DATABASES 
>> <https://docs.djangoproject.com/en/1.4/ref/settings/#databases> in your 
>> settings. There should be a database named 'default'"
>>
>>
>> My DATABASES settings is as follows: 
>>
>>
>> DATABASES = {
>>
>>     'default': {
>>
>>         'ENGINE': 'django_mongodb_engine',
>>
>>         'NAME': 'wikipedia',
>>
>>     }
>>
>> }
>>
>>
>> I don't think there is a problem with my settings. The mongodb server on 
>> my localhost is working fine. The django version I'm using is 1.5.11. 
>>
>>
>> Any help would be very much appreciated!
>>
>>
>> Thanks!
>>
>> Lianghong
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/37905c1e-7a22-4f2f-84f6-ed3afa86eebd%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/37905c1e-7a22-4f2f-84f6-ed3afa86eebd%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/555cd3b2-65ee-4ad8-9c3c-c8037a9f0e29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to