Pymongo Error

Ranjith Kumar ranjithtenz at gmail.com
Tue Jun 19 01:22:37 EDT 2012


Hi all,
I tried Django with Mongodb while running manage.py syncdb I endup with
this error

note : it works fine with sqlite and mysql db

(django-1.3)ranjith at ranjith:~/
sandbox/python-box/hukkster-core-site/hukk$ ./manage.py syncdb
/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/pymongo/connection.py:385:
UserWarning: must provide a username and password to authenticate to
hukkster_testing
  "to authenticate to %s" % (db,))
Creating tables ...
Traceback (most recent call last):
  File "./manage.py", line 14, in <module>
    execute_manager(settings)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 438, in execute_manager
    utility.execute()
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/base.py",
line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/base.py",
line 220, in execute
    output = self.handle(*args, **options)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/base.py",
line 351, in handle
    return self.handle_noargs(**options)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
line 109, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/core/management/sql.py",
line 190, in emit_post_sync_signal
    interactive=interactive, db=db)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
line 41, in create_permissions
    "content_type", "codename"
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/db/models/query.py",
line 107, in _result_iter
    self._fill_cache()
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/db/models/query.py",
line 772, in _fill_cache
    self._result_cache.append(self._iter.next())
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/django/db/models/query.py",
line 959, in iterator
    for row in self.query.get_compiler(self.db).results_iter():
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/djangotoolbox/db/basecompiler.py",
line 229, in results_iter
    for entity in self.build_query(fields).fetch(low_mark, high_mark):
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/djangotoolbox/db/basecompiler.py",
line 290, in build_query
    query.order_by(self._get_ordering())
  File
"/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-packages/djangotoolbox/db/basecompiler.py",
line 339, in _get_ordering
    raise DatabaseError("Ordering can't span tables on non-relational
backends (%s)" % order)
django.db.utils.DatabaseError: Ordering can't span tables on non-relational
backends (content_type__app_label)


DB settings in settings.py

DATABASES = {
    'default': {
    'ENGINE': 'django_mongodb_engine',
    'NAME': 'helloworld',
    'USER': '<user123>',
    'PASSWORD': '12424214',
    'HOST': 'mongodb://staff.mongohq.com/<db-name>',
    'PORT': 'XXXXX',
    },
}

my requirement packages,
Django==1.3
dictshield==0.4.4
django-mongodb-engine==0.4.0
django-social-auth==0.6.9
djangotoolbox==0.0.1
httplib2==0.7.4
mongoengine==0.6.10
mongokit==0.8
oauth2==1.5.211
pymongo==2.2
python-openid==2.2.5
simplejson==2.5.2
wsgiref==0.1.2

Please point me what i missed here...

-- 
Cheers,
Ranjith Kumar K,
Chennai.

http://ranjithtenz.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120619/7f5751d6/attachment.html>


More information about the Python-list mailing list