Re: Python Config Issue?

2010-03-04 Thread Christian Hammond
Awesome :) Glad it works!

Christian

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


On Thu, Mar 4, 2010 at 12:43 PM, etrain  wrote:

> I have solved this problem - thanks for your help Christian! You
> certainly led me on the right path.
>
> For the good of the group, my problem ended up boiling down to a
> permissions issue on my /usr/lib/python2.4/site-packages/*.pth files.
> They were mode 640 (-rw-r-) and owned by root:root. By modifying
> permissions  appropriately, I was able to get everything in my path,
> which basically solved my problem. I had to run rb-site upgrade on my
> site as well in order to get everything working because of subtle
> versioning issues with djblets between the old version of my site and
> the new one, but since then everything works.
>
> - Evan
>
> On Mar 4, 2:11 pm, Christian Hammond  wrote:
> > The Review Board, Djblets, etc. site packages are in .egg directories,
> and
> > it seems that the 32-bit ones aren't being added to the Python path by
> > default. Looks like some of the 64-bit ones are.
> >
> > Christian
> >
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
> >
> >
> >
> > On Thu, Mar 4, 2010 at 8:00 AM, etrain  wrote:
> > > Setting PythonHandler to mod_python.testhandler yielded:
> >
> > > Apache version Apache/2.2.3 (Oracle)
> > > Apache threaded MPM No (single thread MPM)
> > > Apache forked MPM Yes, maximum 256 processes
> > > Apache server root /etc/httpd
> > > Apache document root /var/rb/mysite/htdocs
> > > Apache error log None
> > > Python sys.version 2.4.3 (#1, Jul 2 2009, 15:50:36) [GCC 4.1.2
> > > 20080704 (Red Hat 4.1.2-44)]
> > > Python sys.path /var/rb/mysite/conf
> > > /usr/lib/python2.4/site-packages
> > > /usr/lib/python2.4
> > > /usr/lib
> > > /usr/lib64/python24.zip
> > > /usr/lib64/python2.4
> > > /usr/lib64/python2.4/plat-linux2
> > > /usr/lib64/python2.4/lib-tk
> > > /usr/lib64/python2.4/lib-dynload
> > > /usr/lib64/python2.4/site-packages
> > > /usr/lib64/python2.4/site-packages/Numeric
> > > /usr/lib64/python2.4/site-packages/PIL
> > > /usr/lib64/python2.4/site-packages/gtk-2.0
> > > /usr/lib/python2.4/site-packages
> >
> > > Python interpreter name reviewboard_mysite
> > > mod_python.publisher available Yes
> > > mod_python.psp available Yes
> >
> > > All of my site-packages are in /usr/lib (as opposed to /usr/lib64).
> > > I'm using the 64-bit mod_python on top of 64-bit apache.
> >
> > > On Mar 3, 8:24 pm, etrain  wrote:
> > > > Sorry for the confusion - it's actually RHEL 4.1.2-44. It's funny
> > > > because I have a box with the exact same OS running just fine.
> >
> > > > On Mar 3, 8:16 pm, Christian Hammond  wrote:
> >
> > > > > I don't know. It's possible there's something funky with RHEL and
> > > Python
> > > > > paths when using mod_python, but I don't have an answer there. It'd
> be
> > > > > helpful if someone else on RHEL 5.1 can chime in on this.
> >
> > > > > Christian
> >
> > > > > --
> > > > > Christian Hammond - chip...@chipx86.com
> > > > > Review Board -http://www.reviewboard.org
> > > > > VMware, Inc. -http://www.vmware.com
> >
> > > > > On Wed, Mar 3, 2010 at 5:13 PM, etrain 
> wrote:
> > > > > > Yes, earlier I tried explicitly including the path to ReviewBoard
> in
> > > > > > my PythonPath, and got past this error, but then
> apache/mod_python
> > > > > > started complaining that they couldn't find djblets, which had me
> > > > > > worried that i'd start having to include the absolute path to
> every
> > > > > > missing library - not something I'm accustomed to having to do.
> >
> > > > > > I'm not a python expert, but is there some python setting or
> other
> > > > > > environment variable I should be looking for?
> >
> > > > > > On Mar 3, 8:07 pm, etrain  wrote:
> > > > > > > >>> print reviewboard.__path__
> >
> > > > > > >
> ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> > > > > > > reviewboard']
> >
> > > > > > > On Mar 3, 7:58 pm, Christian Hammond 
> wrote:
> >
> > > > > > > > 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
> 

Re: Python Config Issue?

2010-03-04 Thread etrain
I have solved this problem - thanks for your help Christian! You
certainly led me on the right path.

For the good of the group, my problem ended up boiling down to a
permissions issue on my /usr/lib/python2.4/site-packages/*.pth files.
They were mode 640 (-rw-r-) and owned by root:root. By modifying
permissions  appropriately, I was able to get everything in my path,
which basically solved my problem. I had to run rb-site upgrade on my
site as well in order to get everything working because of subtle
versioning issues with djblets between the old version of my site and
the new one, but since then everything works.

- Evan

On Mar 4, 2:11 pm, Christian Hammond  wrote:
> The Review Board, Djblets, etc. site packages are in .egg directories, and
> it seems that the 32-bit ones aren't being added to the Python path by
> default. Looks like some of the 64-bit ones are.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.reviewboard.org
> VMware, Inc. -http://www.vmware.com
>
>
>
> On Thu, Mar 4, 2010 at 8:00 AM, etrain  wrote:
> > Setting PythonHandler to mod_python.testhandler yielded:
>
> > Apache version Apache/2.2.3 (Oracle)
> > Apache threaded MPM No (single thread MPM)
> > Apache forked MPM Yes, maximum 256 processes
> > Apache server root /etc/httpd
> > Apache document root /var/rb/mysite/htdocs
> > Apache error log None
> > Python sys.version 2.4.3 (#1, Jul 2 2009, 15:50:36) [GCC 4.1.2
> > 20080704 (Red Hat 4.1.2-44)]
> > Python sys.path /var/rb/mysite/conf
> > /usr/lib/python2.4/site-packages
> > /usr/lib/python2.4
> > /usr/lib
> > /usr/lib64/python24.zip
> > /usr/lib64/python2.4
> > /usr/lib64/python2.4/plat-linux2
> > /usr/lib64/python2.4/lib-tk
> > /usr/lib64/python2.4/lib-dynload
> > /usr/lib64/python2.4/site-packages
> > /usr/lib64/python2.4/site-packages/Numeric
> > /usr/lib64/python2.4/site-packages/PIL
> > /usr/lib64/python2.4/site-packages/gtk-2.0
> > /usr/lib/python2.4/site-packages
>
> > Python interpreter name reviewboard_mysite
> > mod_python.publisher available Yes
> > mod_python.psp available Yes
>
> > All of my site-packages are in /usr/lib (as opposed to /usr/lib64).
> > I'm using the 64-bit mod_python on top of 64-bit apache.
>
> > On Mar 3, 8:24 pm, etrain  wrote:
> > > Sorry for the confusion - it's actually RHEL 4.1.2-44. It's funny
> > > because I have a box with the exact same OS running just fine.
>
> > > On Mar 3, 8:16 pm, Christian Hammond  wrote:
>
> > > > I don't know. It's possible there's something funky with RHEL and
> > Python
> > > > paths when using mod_python, but I don't have an answer there. It'd be
> > > > helpful if someone else on RHEL 5.1 can chime in on this.
>
> > > > Christian
>
> > > > --
> > > > Christian Hammond - chip...@chipx86.com
> > > > Review Board -http://www.reviewboard.org
> > > > VMware, Inc. -http://www.vmware.com
>
> > > > On Wed, Mar 3, 2010 at 5:13 PM, etrain  wrote:
> > > > > Yes, earlier I tried explicitly including the path to ReviewBoard in
> > > > > my PythonPath, and got past this error, but then apache/mod_python
> > > > > started complaining that they couldn't find djblets, which had me
> > > > > worried that i'd start having to include the absolute path to every
> > > > > missing library - not something I'm accustomed to having to do.
>
> > > > > I'm not a python expert, but is there some python setting or other
> > > > > environment variable I should be looking for?
>
> > > > > On Mar 3, 8:07 pm, etrain  wrote:
> > > > > > >>> print reviewboard.__path__
>
> > > > > > ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> > > > > > reviewboard']
>
> > > > > > On Mar 3, 7:58 pm, Christian Hammond  wrote:
>
> > > > > > > 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 
> > 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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > > > > > > > for help setting up Review Board.
>
> > > > > > > > On Mar 3, 6:52 pm, Christian Hammond 
> > wrote:
> > > > > > > > > Sounds like it's not seeing Review Board in the Python path.
> > From a
> > > > > > > > command
> > > > > > > > > line, try typing:
>
> > > > > > > > >    $ python
> > > > > > > > >   

Re: Python Config Issue?

2010-03-04 Thread Christian Hammond
The Review Board, Djblets, etc. site packages are in .egg directories, and
it seems that the 32-bit ones aren't being added to the Python path by
default. Looks like some of the 64-bit ones are.

Christian

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


On Thu, Mar 4, 2010 at 8:00 AM, etrain  wrote:

> Setting PythonHandler to mod_python.testhandler yielded:
>
> Apache version Apache/2.2.3 (Oracle)
> Apache threaded MPM No (single thread MPM)
> Apache forked MPM Yes, maximum 256 processes
> Apache server root /etc/httpd
> Apache document root /var/rb/mysite/htdocs
> Apache error log None
> Python sys.version 2.4.3 (#1, Jul 2 2009, 15:50:36) [GCC 4.1.2
> 20080704 (Red Hat 4.1.2-44)]
> Python sys.path /var/rb/mysite/conf
> /usr/lib/python2.4/site-packages
> /usr/lib/python2.4
> /usr/lib
> /usr/lib64/python24.zip
> /usr/lib64/python2.4
> /usr/lib64/python2.4/plat-linux2
> /usr/lib64/python2.4/lib-tk
> /usr/lib64/python2.4/lib-dynload
> /usr/lib64/python2.4/site-packages
> /usr/lib64/python2.4/site-packages/Numeric
> /usr/lib64/python2.4/site-packages/PIL
> /usr/lib64/python2.4/site-packages/gtk-2.0
> /usr/lib/python2.4/site-packages
>
> Python interpreter name reviewboard_mysite
> mod_python.publisher available Yes
> mod_python.psp available Yes
>
>
> All of my site-packages are in /usr/lib (as opposed to /usr/lib64).
> I'm using the 64-bit mod_python on top of 64-bit apache.
>
>
> On Mar 3, 8:24 pm, etrain  wrote:
> > Sorry for the confusion - it's actually RHEL 4.1.2-44. It's funny
> > because I have a box with the exact same OS running just fine.
> >
> > On Mar 3, 8:16 pm, Christian Hammond  wrote:
> >
> >
> >
> > > I don't know. It's possible there's something funky with RHEL and
> Python
> > > paths when using mod_python, but I don't have an answer there. It'd be
> > > helpful if someone else on RHEL 5.1 can chime in on this.
> >
> > > Christian
> >
> > > --
> > > Christian Hammond - chip...@chipx86.com
> > > Review Board -http://www.reviewboard.org
> > > VMware, Inc. -http://www.vmware.com
> >
> > > On Wed, Mar 3, 2010 at 5:13 PM, etrain  wrote:
> > > > Yes, earlier I tried explicitly including the path to ReviewBoard in
> > > > my PythonPath, and got past this error, but then apache/mod_python
> > > > started complaining that they couldn't find djblets, which had me
> > > > worried that i'd start having to include the absolute path to every
> > > > missing library - not something I'm accustomed to having to do.
> >
> > > > I'm not a python expert, but is there some python setting or other
> > > > environment variable I should be looking for?
> >
> > > > On Mar 3, 8:07 pm, etrain  wrote:
> > > > > >>> print reviewboard.__path__
> >
> > > > > ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> > > > > reviewboard']
> >
> > > > > On Mar 3, 7:58 pm, Christian Hammond  wrote:
> >
> > > > > > 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 
> 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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > > > > > > for help setting up Review Board.
> >
> > > > > > > On Mar 3, 6:52 pm, Christian Hammond 
> 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 instal

Re: Python Config Issue?

2010-03-04 Thread etrain
Setting PythonHandler to mod_python.testhandler yielded:

Apache version Apache/2.2.3 (Oracle)
Apache threaded MPM No (single thread MPM)
Apache forked MPM Yes, maximum 256 processes
Apache server root /etc/httpd
Apache document root /var/rb/mysite/htdocs
Apache error log None
Python sys.version 2.4.3 (#1, Jul 2 2009, 15:50:36) [GCC 4.1.2
20080704 (Red Hat 4.1.2-44)]
Python sys.path /var/rb/mysite/conf
/usr/lib/python2.4/site-packages
/usr/lib/python2.4
/usr/lib
/usr/lib64/python24.zip
/usr/lib64/python2.4
/usr/lib64/python2.4/plat-linux2
/usr/lib64/python2.4/lib-tk
/usr/lib64/python2.4/lib-dynload
/usr/lib64/python2.4/site-packages
/usr/lib64/python2.4/site-packages/Numeric
/usr/lib64/python2.4/site-packages/PIL
/usr/lib64/python2.4/site-packages/gtk-2.0
/usr/lib/python2.4/site-packages

Python interpreter name reviewboard_mysite
mod_python.publisher available Yes
mod_python.psp available Yes


All of my site-packages are in /usr/lib (as opposed to /usr/lib64).
I'm using the 64-bit mod_python on top of 64-bit apache.


On Mar 3, 8:24 pm, etrain  wrote:
> Sorry for the confusion - it's actually RHEL 4.1.2-44. It's funny
> because I have a box with the exact same OS running just fine.
>
> On Mar 3, 8:16 pm, Christian Hammond  wrote:
>
>
>
> > I don't know. It's possible there's something funky with RHEL and Python
> > paths when using mod_python, but I don't have an answer there. It'd be
> > helpful if someone else on RHEL 5.1 can chime in on this.
>
> > Christian
>
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
>
> > On Wed, Mar 3, 2010 at 5:13 PM, etrain  wrote:
> > > Yes, earlier I tried explicitly including the path to ReviewBoard in
> > > my PythonPath, and got past this error, but then apache/mod_python
> > > started complaining that they couldn't find djblets, which had me
> > > worried that i'd start having to include the absolute path to every
> > > missing library - not something I'm accustomed to having to do.
>
> > > I'm not a python expert, but is there some python setting or other
> > > environment variable I should be looking for?
>
> > > On Mar 3, 8:07 pm, etrain  wrote:
> > > > >>> print reviewboard.__path__
>
> > > > ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> > > > reviewboard']
>
> > > > On Mar 3, 7:58 pm, Christian Hammond  wrote:
>
> > > > > 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  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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > > > > > for help setting up Review Board.
>
> > > > > > On Mar 3, 6:52 pm, Christian Hammond  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 
> > > 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/
> > > > >

Re: Python Config Issue?

2010-03-03 Thread etrain
Sorry for the confusion - it's actually RHEL 4.1.2-44. It's funny
because I have a box with the exact same OS running just fine.

On Mar 3, 8:16 pm, Christian Hammond  wrote:
> I don't know. It's possible there's something funky with RHEL and Python
> paths when using mod_python, but I don't have an answer there. It'd be
> helpful if someone else on RHEL 5.1 can chime in on this.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.reviewboard.org
> VMware, Inc. -http://www.vmware.com
>
>
>
> On Wed, Mar 3, 2010 at 5:13 PM, etrain  wrote:
> > Yes, earlier I tried explicitly including the path to ReviewBoard in
> > my PythonPath, and got past this error, but then apache/mod_python
> > started complaining that they couldn't find djblets, which had me
> > worried that i'd start having to include the absolute path to every
> > missing library - not something I'm accustomed to having to do.
>
> > I'm not a python expert, but is there some python setting or other
> > environment variable I should be looking for?
>
> > On Mar 3, 8:07 pm, etrain  wrote:
> > > >>> print reviewboard.__path__
>
> > > ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> > > reviewboard']
>
> > > On Mar 3, 7:58 pm, Christian Hammond  wrote:
>
> > > > 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  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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > > > > for help setting up Review Board.
>
> > > > > On Mar 3, 6:52 pm, Christian Hammond  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 
> > 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
> 

Re: Python Config Issue?

2010-03-03 Thread Christian Hammond
I don't know. It's possible there's something funky with RHEL and Python
paths when using mod_python, but I don't have an answer there. It'd be
helpful if someone else on RHEL 5.1 can chime in on this.

Christian

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


On Wed, Mar 3, 2010 at 5:13 PM, etrain  wrote:

> Yes, earlier I tried explicitly including the path to ReviewBoard in
> my PythonPath, and got past this error, but then apache/mod_python
> started complaining that they couldn't find djblets, which had me
> worried that i'd start having to include the absolute path to every
> missing library - not something I'm accustomed to having to do.
>
> I'm not a python expert, but is there some python setting or other
> environment variable I should be looking for?
>
> On Mar 3, 8:07 pm, etrain  wrote:
> > >>> print reviewboard.__path__
> >
> > ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> > reviewboard']
> >
> > On Mar 3, 7:58 pm, Christian Hammond  wrote:
> >
> >
> >
> > > 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  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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > > > for help setting up Review Board.
> >
> > > > On Mar 3, 6:52 pm, Christian Hammond  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 
> 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:
> > > > > > 
> > > > > >ServerName hostname.domain.com:443
> > > > > >DocumentRoot "/var/rb/mysite/htdocs"
> > > > > >SetEnv HTTPS 1
> > > > > >SSLEngine on
> > > > > >

Re: Python Config Issue?

2010-03-03 Thread etrain
Yes, earlier I tried explicitly including the path to ReviewBoard in
my PythonPath, and got past this error, but then apache/mod_python
started complaining that they couldn't find djblets, which had me
worried that i'd start having to include the absolute path to every
missing library - not something I'm accustomed to having to do.

I'm not a python expert, but is there some python setting or other
environment variable I should be looking for?

On Mar 3, 8:07 pm, etrain  wrote:
> >>> print reviewboard.__path__
>
> ['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
> reviewboard']
>
> On Mar 3, 7:58 pm, Christian Hammond  wrote:
>
>
>
> > 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  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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > > for help setting up Review Board.
>
> > > On Mar 3, 6:52 pm, Christian Hammond  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  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:
> > > > > 
> > > > >        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
> > > > >        
> > > > >                PythonPath "['/var/rb/mysite/conf'] + sys.path"
> > > > >                SetEnv DJANGO_SETTINGS_MODULE reviewboard.se

Re: Python Config Issue?

2010-03-03 Thread etrain
>>> print reviewboard.__path__
['/usr/lib/python2.4/site-packages/ReviewBoard-1.5beta1-py2.4.egg/
reviewboard']

On Mar 3, 7:58 pm, Christian Hammond  wrote:
> 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  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 seehttp://www.reviewboard.org/docs/manual/dev/admin/
> > for help setting up Review Board.
>
> > On Mar 3, 6:52 pm, Christian Hammond  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  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:
> > > > 
> > > >        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
> > > >        
> > > >                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
> > > >        
>
> > > >        # Serve static media without running it through mod_python
> > > >        # (overrides the above)
> > > >        
> > > >                SetHandler None
> > > >        
> > > >        
> > > >               

Re: Python Config Issue?

2010-03-03 Thread Christian Hammond
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  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  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  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:
> > > 
> > >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
> > >
> > >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
> > >
> >
> > ># Serve static media without running it through mod_python
> > ># (overrides the above)
> > >
> > >SetHandler None
> > >
> > >
> > >SetHandler None
> > >
> >
> > >
> > >AllowOverride All
> > >RewriteEngine on
> > >RewriteCond %(HTTPS) off
> > >RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
> > > [R]
> > >
> >
> > ># Alias static media requests

Re: Python Config Issue?

2010-03-03 Thread etrain
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  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  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:
> > 
> >        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
> >        
> >                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
> >        
>
> >        # Serve static media without running it through mod_python
> >        # (overrides the above)
> >        
> >                SetHandler None
> >        
> >        
> >                SetHandler None
> >        
>
> >        
> >                AllowOverride All
> >                RewriteEngine on
> >                RewriteCond %(HTTPS) off
> >                RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
> > [R]
> >        
>
> >        # Alias static media requests to filesystem
> >        Alias /media "/var/rb/mysite/htdocs/media"
> >        Alias /errordocs "/var/rb/mysite/htdocs/errordocs"
> > 
>
> > --
> > 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
> > 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? 

Re: Python Config Issue?

2010-03-03 Thread Christian Hammond
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  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:
> 
>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
>
>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
>
>
># Serve static media without running it through mod_python
># (overrides the above)
>
>SetHandler None
>
>
>SetHandler None
>
>
>
>AllowOverride All
>RewriteEngine on
>RewriteCond %(HTTPS) off
>RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
> [R]
>
>
># Alias static media requests to filesystem
>Alias /media "/var/rb/mysite/htdocs/media"
>Alias /errordocs "/var/rb/mysite/htdocs/errordocs"
> 
>
> --
> 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

-- 
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