Bugs item #2794073, was opened at 2009-05-19 22:45
Message generated for change (Comment added) made by cv_student
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2794073&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: SqlObject fails in mod_python because of KeyError
Initial Comment:
A simple python handler in apache which uses sqlobject fails because of a KeyError.
sqlobject/main.py in line 762:
mod = sys.modules[cls.__module__]
Uncommenting the lines makes sqlobject work as intended.
Attached is the test script and the debug output from the script when run as a mod_python handler.
I do not have the error when running test scripts in the console. I am guessing it must be something that mod_python is doing when importing sqlobject.
----------------------------------------------------------------------
Comment By: damike (cv_student)
Date: 2009-05-19 22:49
Message:
Sorry about submitting to early - Here is the bug report:
--------
MOD_PYTHON ERROR
ProcessId: 4361
Interpreter: 'huge.dino.park'
ServerName: 'huge.dino.park'
DocumentRoot: '/var/www/'
URI: '/~michael/test.py'
Location: None
Directory: '/home/michael/public_html/'
Filename: '/home/michael/public_html/test.py'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'mod_python.publisher'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1128, in _execute_target
result = object(arg)
File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line
204, in handler
module = page_cache[req]
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1059, in __getitem__
return import_module(req.filename)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
296, in import_module
log, import_path)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
680, in import_module
execfile(file, module.__dict__)
File "/home/michael/public_html/test.py", line 7, in <module>
class News(sqlobject.SQLObject):
File "/usr/lib/python2.5/site-packages/sqlobject/declarative.py", line
92, in __new__
cls.__classinit__(cls, new_attrs)
File "/usr/lib/python2.5/site-packages/sqlobject/main.py", line 762, in
__classinit__
mod = sys.modules[cls.__module__]
KeyError: '_mp_32178831045d61a426cfbf437900de0b'
MODULE CACHE DETAILS
Accessed: Tue May 19 22:40:42 2009
Generation: 0
_mp_32178831045d61a426cfbf437900de0b {
FileName: '/home/michael/public_html/test.py'
Instance: 1 [IMPORT]
Generation: 0 [ERROR]
Modified: Tue May 19 22:35:34 2009
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2794073&group_id=74338
|