me
mlists at e-beyond.de
Tue Mar 13 07:19:53 EST 2007
Hi there, I've got an issue with mod_python. There is a script (index.py) wich is processed when I go to http://www.xyz.somewhere/ but when I reload the page 3-4 times I'll receive the error below. It doesn't matter if the page is reloaded fast or slowly. The only point that may be an problem (but I didn't think so) is a factory which should provide the classes for the modules (not the python-modules) of the site. thanks for your help!! marc mod_python: 3.3.1 python 2.4 The Factory: class ContentFactory: def factory(self,className, *args): aClass = getattr(__import__(__name__), className) return apply(aClass, args) The error-message: MOD_PYTHON ERROR ProcessId: 29986 Interpreter: 'www.xyz.somehwere' ServerName: 'www.xyz.somehwere' DocumentRoot: '/www/www.xyz.somehwere/htdocs' URI: '/' Location: '/' Directory: None Filename: '/www/www.xyz.somehwere/htdocs/index.py' PathInfo: '' Phase: 'PythonHandler' Handler: 'mod_python.publisher' Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line 213, in handler published = publish_object(req, object) File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line 425, in publish_object return publish_object(req,util.apply_fs_data(object, req.form, req=req)) File "/usr/lib/python2.4/site-packages/mod_python/util.py", line 554, in apply_fs_data return object(**args) File "/www/www.xyz.somehwere/htdocs/index.py", line 6, in index return c.getResponse() File "/www/www.xyz.somehwere/htdocs/_module/Content.py", line 28, in getResponse return Template ( file = self.req.document_root() + '/_templates/standard.tmpl', searchList = [{ 'authenticated': self.authenticated , 'content' : self._processContent()}] ) File "/www/www.xyz.somehwere/htdocs/_module/Content.py", line 23, in _processContent contentRunner = cp.factory('MainIndex',self.req) File "/www/www.xyz.somehwere/htdocs/_module/ContentFactory.py", line 6, in factory aClass = getattr(__import__(__name__), className) AttributeError: 'module' object has no attribute 'MainIndex' MODULE CACHE DETAILS Accessed: Tue Mar 13 13:08:47 2007 Generation: 1 _mp_977643700f732f7a07a576608a2136c2 { FileName: '/www/www.xyz.somehwere/htdocs/index.py' Instance: 1 Generation: 1 Modified: Tue Mar 13 09:10:38 2007 Imported: Tue Mar 13 12:41:52 2007 } -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070313/5206c277/attachment.bin
|