Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'tuple' object has no attribute 'insert' #153

Closed
ghost opened this issue Sep 22, 2012 · 2 comments
Closed

AttributeError: 'tuple' object has no attribute 'insert' #153

ghost opened this issue Sep 22, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 22, 2012

I just installed mongodb-engine and when I simply added a MongoDB database to my existing MySQL in my settings file, I get the following error when trying to address the site.

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '<xx.xx.xx.xx>', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
},
'mongotest': {
'ENGINE': 'django_mongodb_engine',
'NAME': 'mongotest',
'HOST': '',
'PORT': '27017'
}
}

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/Library/Python/2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in call
return self.application(environ, start_response)
File "/Library/Python/2.7/site-packages/django/core/handlers/wsgi.py", line 228, in call
signals.request_started.send(sender=self.class)
File "/Library/Python/2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "/Library/Python/2.7/site-packages/django/db/init.py", line 52, in reset_queries
for conn in connections.all():
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 104, in all
return [self[alias] for alias in self]
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 92, in getitem
backend = load_backend(db['ENGINE'])
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 24, in load_backend
return import_module('.base', backend_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "build/bdist.macosx-10.7-intel/egg/django_mongodb_engine/init.py", line 13, in
AttributeError: 'tuple' object has no attribute 'insert'

@ghost
Copy link
Author

ghost commented Sep 24, 2012

Ok, so I get this same error when I remove the MySQL database and set MongoDB as default. Instead, the error occurs when I attempt to syncdb. Did I install the django-mongodb-engine incorrectly? I'm running on Mac OS X Lion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant