Hi Zhu, Strange. Looks like it'd be okay, provided that the Python paths are the same.
Which distro is this? Christian -- Christian Hammond - [email protected] Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Wed, Oct 31, 2012 at 11:53 AM, Zhu Wayne <[email protected]> wrote: > I am using Python 2.4.3 and can import MySQLdb without any issue in the > shell. > $python -V > Python 2.4.3 > $python > Python 2.4.3 (#1, Nov 3 2010, 12:52:40) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import MySQLdb; > > However, httpd log shows error: > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] mod_wsgi (pid=550): > Exception occurred processing WSGI script '/ > var/www/reviews.com/htdocs/reviewboard.wsgi'. > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] Traceback (most > recent call last): > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/core/handlers/wsgi.py", line 250, in __call__ > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] > self.load_middleware() > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/core/handlers/base.py", line 45, in load_middleware > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] mod = > import_module(mw_module) > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/utils/importlib.py", line 35, in import_module > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] __import__(name) > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Djblets-0.6.23-py2.4.eg > g/djblets/siteconfig/middleware.py", line 27, in ? > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] from > djblets.siteconfig.models import SiteConfiguration > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Djblets-0.6.23-py2.4.eg > g/djblets/siteconfig/models.py", line 26, in ? > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] from > django.contrib.sites.models import Site > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/contrib/sites/models.py", line 1, in ? > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] from django.db > import models > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/db/__init__.py", line 78, in ? > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] connection = > connections[DEFAULT_DB_ALIAS] > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/db/utils.py", line 93, in __getitem__ > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] backend = > load_backend(db['ENGINE']) > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/db/utils.py", line 33, in load_backend > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] return > import_module('.base', backend_name) > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/utils/importlib.py", line 35, in import_module > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] __import__(name) > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] File > "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/ > django/db/backends/mysql/base.py", line 14, in ? > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] raise > ImproperlyConfigured("Error loading MySQLdb module: %s > " % e) > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] > ImproperlyConfigured: Error loading MySQLdb module: No module na > med MySQLdb > [Wed Oct 31 11:36:27 2012] [error] [client 127.0.0.1] mod_wsgi (pid=553): > Exception occurred processing WSGI script '/ > var/www/reviews.com/htdocs/reviewboard.wsgi'. > > Anyone knows how to fix it? I am not an expert on Python. > > -- > Want to help the Review Board project? Donate today at > http://www.reviewboard.org/donate/ > Happy user? Let us know at http://www.reviewboard.org/users/ > -~----------~----~----~----~------~----~------~--~--- > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/reviewboard?hl=en > > > -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
