Graham Dumpleton
grahamd at dscpl.com.au
Thu May 12 23:48:34 EDT 2005
Wouter van Marle wrote .. > > Using "import main" is not a good idea when the "main.py" is also being > > loaded by mod_python by its module loading system. Instead of: > > > > import main > > > > use: > > > > main = apache.import_module("main") > > > > apache.import_module("main") works, as in it loads the module, however > now the "module not found" errors have been replaced by "AttributeError: > 'module' object has no attribute 'get_session'" errors. So still not > really a solution... > > I'll at least check out the apache module, maybe indeed something > different to what you suggested. Do you have a "main.py" located anywhere else in your document tree? There are some issues with using the same named file with the publisher extensions in more than one directory. This may or may not be related: http://issues.apache.org/jira/browse/MODPYTHON-9 http://issues.apache.org/jira/browse/MODPYTHON-10 http://issues.apache.org/jira/browse/MODPYTHON-11 The original import problem is covered by: http://issues.apache.org/jira/browse/MODPYTHON-12 Graham
|