[mod_python] import madness!

The Doctor What list.mod_python at docwhat.gerf.org
Wed May 12 14:01:22 EDT 2004


* Gregory (Grisha) Trubetskoy (grisha at modpython.org) [040512 12:22]:
> 
> I still don't get it - once a module is imported, all subsequent imports
> are ignored - are you using reload to reload the module?

With respect to python outside the handler, you are 100% right. I'm
not calling reload anywhere at all, so that's not the issue.

This is happening when mod_python imports the handler module *not*
in the handler itself.  From PythonInitHandler.

Here is a (cleaned up) traceback from the error.log:

[Tue May 11 11:24:46 2004] [error] PythonInitHandler blah.handler: Traceback (most recent call last):
[Tue May 11 11:24:46 2004] [error] PythonInitHandler blah.handler:   File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 181, in Dispatch\n    module = import_module(module_name, _req)
[Tue May 11 11:24:46 2004] [error] PythonInitHandler blah.handler:   File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 335, in import_module\n    module = imp.load_module(mname, f, p, d)
[Tue May 11 11:24:46 2004] [error] PythonInitHandler blah.handler:   File "/path-to/blah/handler.py", line 41, in ?\n raise ImportError, newerr
[Tue May 11 11:24:46 2004] [error] PythonInitHandler blah.handler: ImportError: cannot import name config

Ciao!

-- 
Windows has detected that your mouse has moved. To implement this change, it is necessary to reboot.
	 -- Anonymous

The Doctor What: Da Man                          http://docwhat.gerf.org/
docwhat *at* gerf *dot* org                                        KF6VNC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://modpython.org/pipermail/mod_python/attachments/20040512/e89b33f3/attachment.bin


More information about the Mod_python mailing list