[mod_python] Import problem

Jim Gallacher jpg at jgassociates.ca
Fri Jun 22 12:00:54 EDT 2007


Olaf Stein wrote:
> Hi all,
> 
> I am running into this really weird problem:
> I am on a mac, apache 2.2, mod_python 3.3.1
> 
> I recently upgraded the python version from 2.3.5 to 2.5.1, recompiled
> apache and mod_python. This resulted in import errors in my application
> (like the one shown below, replacing 2.3 with 2.5).
> 
> As I could not figure out what happened I uninstalled 2.5, recompiled apache
> and mod_python with 2.3.5 (basically the setup that was running nicely for a
> good while) and now I get the same error.
> 
> Does anyone have any advice, this is driving me nuts.
> Thanks in advance
> Olaf
> 
> 
> ----------------
> MOD_PYTHON ERROR
> 
> ProcessId:      11732
> Interpreter:    'resw87031esw0h.columbuschildrens.net'
> 
> ServerName:     'resw87031esw0h.columbuschildrens.net'
> DocumentRoot:   '/usr/local/apache/htdocs'
> 
> URI:            '/apps/cqcb/enter'
> Location:       None
> Directory:      '/usr/local/apache/htdocs/apps/'
> Filename:       '/usr/local/apache/htdocs/apps/cqcb.py'
> PathInfo:       '/enter'
> 
> Phase:          'PythonHandler'
> Handler:        'mod_python.publisher'
> 
> Traceback (most recent call last):
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/importer.py", line 1537, in HandlerDispatch
>     default=default_handler, arg=req, silent=hlist.silent)
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/importer.py", line 1229, in _process_target
>     result = _execute_target(config, req, object, arg)
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/importer.py", line 1128, in _execute_target
>     result = object(arg)
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/publisher.py", line 204, in handler
>     module = page_cache[req]
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/importer.py", line 1059, in __getitem__
>     return import_module(req.filename)
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/importer.py", line 296, in import_module
>     log, import_path)
> 
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
> -packages/mod_python/importer.py", line 680, in import_module
>     execfile(file, module.__dict__)
> 
>   File "/usr/local/apache/htdocs/apps/cqcb.py", line 25, in ?
>     from simpla.mod_simpla import *
> 
> ImportError: No module named simpla.mod_simpla
> 

Where is the simpla module located? It does exist, right? ;)

Jim




More information about the Mod_python mailing list