[mod_python] Modpython handler and package

TSalm TSalm at free.fr
Tue Apr 26 05:34:20 EDT 2011


Hi,

I'm using the PythonHandler.
I first created a "one piece" module. But now, I need to split it in a 
package ( a folder with an __init__.py and other files).

But now, I've got the error :
------------------------- PAGE ERROR ------------------------------
MOD_PYTHON ERROR

ProcessId:      9486
Interpreter:    'webmirror.com'

ServerName:     'webmirror.com'
DocumentRoot:   '/var/www/webmirror.com/'

URI:            '/handler/'
Location:       None
Directory:      '/var/www/webmirror.com/handler/'
Filename:       '/var/www/webmirror.com/handler/'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'webmirror'

Traceback (most recent call last):

   File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 
1537, in HandlerDispatch
     default=default_handler, arg=req, silent=hlist.silent)

   File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 
1202, in _process_target
     module = import_module(module_name, path=path)

   File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 
304, in import_module
     return __import__(module_name, {}, {}, ['*'])

ImportError: No module named webmirror
------------------------------------------------------------------------

The .htaccess aim to the folder's name :
-------------------------- .htaccess --------------------------------
SetHandler mod_python
PythonHandler webmirror
PythonDebug On
------------------------------------------------------------------------

Thanks in advance for your help,
-TSalm

____________
Analyse antivirus effectuée par G Data AntiVirus




More information about the Mod_python mailing list