|
Hi, I am following the instructions here to great success but I've hit a snag when going to run the manage.py script to create the database tables. I have Postgres 8.4 installed and configured, because I desire its full text search, but I get errors seemingly to do with forum_modules wanting mysqlfulltext. I am a newbie to configuring OSQA so this has me confused. Any advice on what I'm doing wrong would be appreciated. BTW I am using today's latest svn trunk. Here are the manage.py errors: Traceback (most recent call last):
File "/opt/osqa/forum_modules/mysqlfulltext/__init__.py", line 8, in <module>
import MySQLdb
ImportError: No module named MySQLdb
Traceback (most recent call last):
File "/opt/osqa/../osqa/forum_modules/mysqlfulltext/__init__.py", line 8, in <module>
import MySQLdb
ImportError: No module named MySQLdb
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_manager(settings)
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 7, in <module>
from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/core/management/sql.py", line 6, in <module>
from django.db import models
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/db/__init__.py", line 78, in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/db/utils.py", line 93, in __getitem__
backend = load_backend(db['ENGINE'])
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/db/utils.py", line 33, in load_backend
return import_module('.base', backend_name)
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/opt/ActivePython-2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 24, in <module>
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2
And my settings_local.py database settings are: DATABASES = {
'default': {
'ENGINE': 'postgresql_psycopg2',
'NAME': 'osqa',
'USER': 'uosqa',
'PASSWORD': '********',
'HOST': 'localhost',
'PORT': '',
}
}
|
|
The MySQL traceback is a red herring, that module just happens to print the details when the module load fails and won't actually cause any problems. Also, don't remove the module, just add it to DISABLED_MODULES in settings_local.py to suppress the error. This is your problem:
Change ENGINE to django.db.backends.postgresql_psycopg2. If you have further problems, make sure psycopg2 is installed with easy_install/pip |