https://issues.apache.org/bugzilla/show_bug.cgi?id=45204

           Summary: mod_python throws exception - importer.py returned non-
                    integer
           Product: Apache httpd-2
           Version: 2.2.8
          Platform: PC
               URL: http://localhost/
        OS/Version: Windows Vista
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Other Modules
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I found the following in the error log when trying to verify that mod_python
was working properly:

[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]   File
"D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py", 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]   File
"D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py", 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]   File
"D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py", line
296, in import_module\n    log, import_path)
[Sat Jun 14 16:22:29 2008] [error] [client 127.0.0.1]   File
"D:\\Programs\\Python25\\lib\\site-packages\\mod_python\\importer.py", line
680, in import_module\n    execfile(file, module.__dict__)
Traceback (most recent call last):
  File "D:\Programs\Python25\lib\site-packages\mod_python\importer.py", 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.

I am running Apache 2.2.8 with mod_python 3.3.1 and python 2.5 on a 32 bit
Windows Vista machine with the following code in mptest.py:

from mod_python import apache

def handler(req):
        req.log_error('handler')
        req.content_type = 'text/plain'
#       req.send_http_header()
        req.write('mptest.py\n')
        return apache.OK

Please let me know if I can provide further details.

Thanks, Mike


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to