--> -->
<type 'exceptions.KeyError'> | Python 2.6.2: /home/cheshire/install/bin/python Sat May 18 23:44:48 2013 |
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
| /home/cheshire/cheshire3/www/istc/istcHandler.py in handler(req=<mp_request object at 0x91eb094>) |
1256 istchandler = IstcHandler(lgr)
|
1257 try:
|
1258 istchandler.handle(req)
|
1259 finally:
|
1260 try: lgr.flush() # flush all logged strings to disk
|
| istchandler undefined, req = <mp_request object at 0x91eb094> |
| /home/cheshire/cheshire3/www/istc/istcHandler.py in handle(self=<istcHandler.IstcHandler instance at 0xa983ecc>, req=<mp_request object at 0x91eb094>) |
1051 if operation:
|
1052 if (operation == 'record'):
|
1053 d = self.display_rec(session, form)
|
1054 elif (operation == 'search'):
|
1055 d = self.handle_istc(session, form)
|
| d undefined, self = <istcHandler.IstcHandler instance at 0xa983ecc>, self.display_rec = <bound method IstcHandler.display_rec of <istcHandler.IstcHandler instance at 0xa983ecc>>, session = <cheshire3.session.Session instance at 0xa97eb0c>, form = {'q': [Field('q', '0')], 'operation': [Field('operation', 'record')]} |
| /home/cheshire/cheshire3/www/istc/istcHandler.py in display_rec(self=<istcHandler.IstcHandler instance at 0xa983ecc>, session=<cheshire3.session.Session instance at 0xa97eb0c>, form={'q': [Field('q', '0')], 'operation': [Field('operation', 'record')]}) |
503 txr = db.get_object(session, 'recordTxr-screen')
|
504 menuTxr = db.get_object(session, 'menuTxr')
|
505 rsid = int(form['rsid'].value)
|
506 id = int(form['q'].value)
|
507 locations = form.get('locations', 'all')
|
| rsid undefined, builtin int = <type 'int'>, form = {'q': [Field('q', '0')], 'operation': [Field('operation', 'record')]}, ].value undefined |
| /home/cheshire/install/lib/python2.6/site-packages/mod_python/util.py in __getitem__(self={'q': [Field('q', '0')], 'operation': [Field('operation', 'record')]}, key='rsid') |
409 def __getitem__(self, key):
|
410 """Dictionary style indexing."""
|
411 found = self.list.table()[key]
|
412 if len(found) == 1:
|
413 return found[0]
|
| found undefined, self = {'q': [Field('q', '0')], 'operation': [Field('operation', 'record')]}, self.list = [Field('operation', 'record'), Field('q', '0')], self.list.table = <bound method FieldList.table of [Field('operation', 'record'), Field('q', '0')]>, key = 'rsid' |
<type 'exceptions.KeyError'>: 'rsid'
args =
('rsid',)
message =
'rsid'
MOD_PYTHON ERROR
ProcessId: 26560
Interpreter: 'main-interpreter'
ServerName: 'istc.bl.uk'
DocumentRoot: '/home/cheshire/install/htdocs/istc'
URI: '/search/search.html'
Location: '/search'
Directory: None
Filename: '/home/cheshire/install/htdocs/istc/search/search.html'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'istcHandler'
Traceback (most recent call last):
File "/home/cheshire/install/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/home/cheshire/install/lib/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/home/cheshire/install/lib/python2.6/site-packages/mod_python/importer.py", line 1155, in _execute_target
assert (type(result) == types.IntType), _result_warning % type(result)
AssertionError: Handler has returned result or raised SERVER_RETURN
exception with argument having non integer type. Type of value returned
was <type 'NoneType'>, whereas expected <type 'int'>.