Okay, do that again and then type:

    >>> print reviewboard.__path__

It looks like what's happening is that, one way or another, Review Board
isn't in the system path that mod_python is searching.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Wed, Mar 3, 2010 at 4:34 PM, etrain <evan.spa...@gmail.com> wrote:

> Python 2.4.3 (#1, Jul  2 2009, 15:50:36)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import reviewboard
> >>> import reviewboard.settings
> Unable to read settings_local.py.
>
> Please see http://www.reviewboard.org/docs/manual/dev/admin/
> for help setting up Review Board.
>
>
> On Mar 3, 6:52 pm, Christian Hammond <chip...@chipx86.com> wrote:
> > Sounds like it's not seeing Review Board in the Python path. From a
> command
> > line, try typing:
> >
> >    $ python
> >    >>> import reviewboard
> >
> > See if that succeeds. If it does, type:
> >
> >    >>> import reviewboard.settings
> >
> > If that tells you it can't find settings_local.py, then that's fine. If
> it
> > can't find reviewboard.settings, then there's a path issue definitely.
> >
> > Christian
> >
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
> >
> >
> >
> > On Wed, Mar 3, 2010 at 7:13 AM, etrain <evan.spa...@gmail.com> wrote:
> > > All,
> >
> > > I'm getting the following error on a recent ReviewBoard on Apache
> > > +mod_python install on RHEL 5.1. I'm wondering if this is a django or
> > > mod_python version issue. All relevant permissions are set such that
> > > apache (the process owner) has full rwx to /var/rb/mysite directory.
> >
> > > Mod_python error: "PythonHandler django.core.handlers.modpython"
> >
> > > Traceback (most recent call last):
> >
> > >  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line
> > > 299, in HandlerDispatch
> > >    result = object(req)
> >
> > >  File "/usr/lib/python2.4/site-packages/django/core/handlers/
> > > modpython.py", line 228, in handler
> > >    return ModPythonHandler()(req)
> >
> > >  File "/usr/lib/python2.4/site-packages/django/core/handlers/
> > > modpython.py", line 191, in __call__
> > >    self.load_middleware()
> >
> > >  File "/usr/lib/python2.4/site-packages/django/core/handlers/
> > > base.py", line 31, in load_middleware
> > >    for middleware_path in settings.MIDDLEWARE_CLASSES:
> >
> > >  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
> > > line 28, in __getattr__
> > >    self._import_settings()
> >
> > >  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
> > > line 59, in _import_settings
> > >    self._target = Settings(settings_module)
> >
> > >  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
> > > line 94, in __init__
> > >    raise ImportError, "Could not import settings '%s' (Is it on
> > > sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
> > > e)
> >
> > > ImportError: Could not import settings 'reviewboard.settings' (Is it
> > > on sys.path? Does it have syntax errors?): No module named
> > > reviewboard.settings
> >
> > > The relevent part of my apache config looks like the following:
> > > <VirtualHost xxx.yyy.zzz.aaa:443>
> > >        ServerName hostname.domain.com:443
> > >        DocumentRoot "/var/rb/mysite/htdocs"
> > >        SetEnv HTTPS 1
> > >        SSLEngine on
> > >        SSLCertificateFile /etc/httpd/conf/ssl/hostname.crt
> > >        SSLCertificateKeyFile /etc/httpd/conf/ssl/hostname.key
> > >        SSLProtocol all
> > >        SSLCipherSuite HIGH:MEDIUM
> > >        RewriteEngine on
> > >        RewriteCond %(HTTPS) off
> > >        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
> > >        # Error handlers
> > >        ErrorDocument 500 /errordocs/500.html
> >
> > >        # Serve django pages
> > >        <Location "/">
> > >                PythonPath "['/var/rb/mysite/conf'] + sys.path"
> > >                SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
> > >                SetEnv PYTHON_EGG_CACHE "/var/rb/mysite/tmp/egg_cache"
> > >                SetHandler mod_python
> > >                PythonHandler django.core.handlers.modpython
> > >                PythonAutoReload Off
> > >                PythonDebug On
> > >                # Used to run multiple mod_python sites in the same
> > > apache
> > >                PythonInterpreter reviewboard_mysite
> > >        </Location>
> >
> > >        # Serve static media without running it through mod_python
> > >        # (overrides the above)
> > >        <Location "/media">
> > >                SetHandler None
> > >        </Location>
> > >        <Location "/errordocs">
> > >                SetHandler None
> > >        </Location>
> >
> > >        <Directory "/var/rb/mysite/htdocs">
> > >                AllowOverride All
> > >                RewriteEngine on
> > >                RewriteCond %(HTTPS) off
> > >                RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
> > > [R]
> > >        </Directory>
> >
> > >        # Alias static media requests to filesystem
> > >        Alias /media "/var/rb/mysite/htdocs/media"
> > >        Alias /errordocs "/var/rb/mysite/htdocs/errordocs"
> > > </VirtualHost>
> >
> > > --
> > > Want to help the Review Board project? Donate today at
> > >http://www.reviewboard.org/donate/
> > > Happy user? Let us know athttp://www.reviewboard.org/users/
> > > -~----------~----~----~----~------~----~------~--~---
> > > To unsubscribe from this group, send email to
> > > reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> <reviewboard%2bunsubscr...@googlegr­oups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/reviewboard?hl=en- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> 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
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> 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 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to