[Python-de] die tücken der funktion import

Ralf Schönian ralf at schoenian-online.de
Mi Dez 20 09:50:06 CET 2006


Rauch Pauli schrieb:
> [Wed Dec 20 06:40:42 2006] [error] [client 192.168.0.57] PythonHandler
> mod_python.psp: Traceback (most recent call last):
> [Wed Dec 20 06:40:42 2006] [error] [client 192.168.0.57] PythonHandler
> mod_python.psp:   File
> "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in
> HandlerDispatch\n    result = object(req)
> [Wed Dec 20 06:40:42 2006] [error] [client 192.168.0.57] PythonHandler
> mod_python.psp:   File
> "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 297, in
> handler\n    p.run()
> [Wed Dec 20 06:40:42 2006] [error] [client 192.168.0.57] PythonHandler
> mod_python.psp:   File
> "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 208, in run\n
>    exec code in global_scope
> [Wed Dec 20 06:40:42 2006] [error] [client 192.168.0.57] PythonHandler
> mod_python.psp:   File "/srv/www/htdocs/hp-py/index.py", line 5, in ?\n
>    import header_inc,index_inc,footer_inc
> [Wed Dec 20 06:40:42 2006] [error] [client 192.168.0.57] PythonHandler
> mod_python.psp: ImportError: No module named header_inc
>
>   
Versuch doch einmal dem Apache-Häuptling den Pfad zu Deinem Modul 
beizubringen:
SetEnv PATH /srv/www/htdocs/hp-py/includes:$PATH

Danach den Apache neu starten.

Ralf