quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Landis <mlandis...@comcast.net>
Subject mod_python 3.3.1 bug report
Date Mon, 16 Jun 2008 04:52:10 GMT
<html>
<body>
<br>
<pre>32 bit Windows Vista, Apache 2.2.8, mod_python 3.3.1, python 2.5.2.2
(r252:60911)

I received a 500 error from Apache httpd while attempting to get
mod_python working on Windows Vista.&nbsp; Following are entries from
error.log, httpd.conf, and the Python source (mptest.py) used as a test
case.&nbsp; The <font face="Courier New, Courier" color="#0000FF">error
occurs within importer.py (part of the mod_pyton site-package)</font>.

Apache httpd error log:
[Sat Jun 14 16:22:29 2008] [notice] mod_python (pid=3708,
interpreter='localhost'): Importing module
'D:\\htdocs\\Python\\mptest.py'
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] mod_python
(pid=3708, interpreter='localhost', phase='PythonHandler',
handler='mptest'): Application error
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] ServerName:
'localhost'
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] DocumentRoot:
'D:/htdocs'
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] URI:
'/Python/mptest.py'
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] Location: None
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] Directory:
'D:/htdocs/Python/'
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] Filename:
'D:/htdocs/Python/mptest.py'
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] PathInfo: ''
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1]&nbsp;&nbsp; File
&quot;D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py&quot;,
line 1537, in HandlerDispatch\n default=default_handler, arg=req,
silent=hlist.silent)
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1]&nbsp;&nbsp; File
&quot;D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py&quot;,
line 1202, in _process_target\n module = import_module(module_name,
path=path)
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1]&nbsp;&nbsp; File
&quot;D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py&quot;,
line 296, in import_module\n log, import_path)
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1]&nbsp;&nbsp; File
&quot;D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py&quot;,
line 680, in import_module\n execfile(file, module.__dict__)
Traceback (most recent call last): File
&quot;D:\Programs\Python25\lib\site-packages\mod_python\importer.py&quot;,
line 1784, in ReportError log_error(line[:-1], flags)
TypeError: argument 1 must be string without null bytes or None, not str
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1] python_handler:
Dispatch() returned non-integer.
--------------------------------------------------------------------------------
httpd.conf entries:
LoadModule python_module modules/mod_python.so

&lt;Directory D:\htdocs\Python&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
AddHandler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mod_python .py
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PythonHandler&nbsp;&nbsp;
mptest
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PythonDebug&nbsp;&nbsp;&nbsp;&nbsp;
On 
&lt;/Directory&gt;
--------------------------------------------------------------------------------
Python source (in mptest.py):

from mod_python import apache

def handler(req):
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; req.log_error('handler')
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; req.content_type =
'text/plain'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; req.write('HelloWorld\n')
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return apache.OK


</body>
</html>


Mime
View raw message