On 2005-07-08 16:35:30, Aditya Rajgarhia wrote:
Thanks for the reply. I'm using NAV 3.0 rc1, and the solution which you wrote for the old one is not valid because that line isn't there in the new NAV.
Weird thing we haven't discovered this bug on our own.. This might be a guess, but try editing the file
/usr/local/nav/lib/python/nav/web/__init__.py
Now cut out the line "import nav.web.auth" and paste it again inside "def headerparserhandler" right above the line "import state". Make sure the lines are all indented the same way. ie:
def headerparserhandler(req): (..) import nav.web.auth import state from mod_python import apache
Please tell us if this fixed the problem.
On 2005-07-08 23:51:59, Stian S?iland wrote:
Now cut out the line "import nav.web.auth" and paste it again inside "def headerparserhandler" right above the line "import state". Make sure the lines are all indented the same way. ie:
Important thing I forgot to mention.. the old import line must be deleted, not just copied. The whole idea is to delay the import of nav.web.auth to the call of headerparserhandler() - as nav.web.auth will import nav.web.preferences and thereby nav/web/__init__.py - creating a dead lock.
Stian:
I tried that already, it still gives the error. However the traceback changes, look below. I am guessing it's due to mod_python on my system because I just finished installing it on another Gentoo machine, got running in 2 hours flat [in the buggy box I've already spent 2 weeks] :)
I must say that Gentoo handled the dependencies extremely well, and the installation instructions on the Wiki for Suse worked fine for the most part, just wanted to let you know.
Aditya
------------------------------------------ Mod_python error: "PythonHeaderParserHandler nav.web"
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req)
File "/usr/local/nav/lib/python/nav/web/__init__.py", line 54, in headerparserhandler state.setupSession(req)
AttributeError: 'module' object has no attribute 'authenticate'
------------------------------------------
From stian.soiland at ntnu.no Mon Jul 11 00:56:32 2005
From: stian.soiland at ntnu.no (Stian =?iso-8859-1?Q?S=F8iland?=) Date: Sun Jul 10 23:56:42 2005 Subject: [Nav-users] In-Reply-To: 42CF2C43.6000706@iwu.edu References: 2095394.1120833330918.JavaMail.arajgarh@iwu.edu 20050708215158.GA21459@itea.ntnu.no 20050708215421.GB21459@itea.ntnu.no 42CF2C43.6000706@iwu.edu Message-ID: 20050710215632.GA21238@itea.ntnu.no
On 2005-07-09 03:45:39, Aditya Rajgarhia wrote:
I tried that already, it still gives the error. However the traceback changes, look below. I am guessing it's due to mod_python on my system because I just finished installing it on another Gentoo machine, got running in 2 hours flat [in the buggy box I've already spent 2 weeks] :)
Also, try restarting apache if you haven't done so, as mod_python will cache old python modules.