A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/usr/local/lib/python2.7/dist-packages/bonito/CGIPublisher.py in run_unprotected(self=<__main__.BonitoCGI instance>, path=['sortx'], selectorname='corpname', outf=<open file '<stdout>', mode 'w'>) |
278 if self._has_access or path[0] == 'feedback':
|
279 methodname, tmpl, result = self.process_method (path[0], path,
|
=> 280 named_args)
|
281 else: # redirect to login or raise error
|
282 methodname = path[0]
|
named_args = {'attrs': u'word', 'copy_icon': u'1', 'corpname': u'HNK_v30', 'ctxattrs': u'word', 'gdex_enabled': u'1', 'gdexcnt': u'100000', 'pagesize': u'2rand[0,1,1]', 'q': [u'q[word=="mo\u017ee"]', u'e100000 ', u'Fdoc', u'r250', u'r250', u'D', u'D', u'sword/i 1>0~3>0'], 'refs': u'#,doc,=doc.file,=head.type', 'show_gdex_scores': u'1', ...} |
/usr/local/lib/python2.7/dist-packages/bonito/CGIPublisher.py in process_method(self=<__main__.BonitoCGI instance>, methodname='sortx', pos_args=['sortx'], named_args={'attrs': u'word', 'copy_icon': u'1', 'corpname': u'HNK_v30', 'ctxattrs': u'word', 'gdex_enabled': u'1', 'gdexcnt': u'100000', 'pagesize': u'2rand[0,1,1]', 'q': [u'q[word=="mo\u017ee"]', u'e100000 ', u'Fdoc', u'r250', u'r250', u'D', u'D', u'sword/i 1>0~3>0'], 'refs': u'#,doc,=doc.file,=head.type', 'show_gdex_scores': u'1', ...}) |
313 return (methodname,
|
314 getattr (method, 'template', methodname + '.tmpl'),
|
=> 315 self.call_method (method, pos_args, named_args))
|
316 except Exception, e:
|
317 if self.format == 'json':
|
self = <__main__.BonitoCGI instance>, self.call_method = <bound method BonitoCGI.call_method of <__main__.BonitoCGI instance>>, method = <bound method BonitoCGI.sortx of <__main__.BonitoCGI instance>>, pos_args = ['sortx'], named_args = {'attrs': u'word', 'copy_icon': u'1', 'corpname': u'HNK_v30', 'ctxattrs': u'word', 'gdex_enabled': u'1', 'gdexcnt': u'100000', 'pagesize': u'2rand[0,1,1]', 'q': [u'q[word=="mo\u017ee"]', u'e100000 ', u'Fdoc', u'r250', u'r250', u'D', u'D', u'sword/i 1>0~3>0'], 'refs': u'#,doc,=doc.file,=head.type', 'show_gdex_scores': u'1', ...} |
/usr/local/lib/python2.7/dist-packages/bonito/CGIPublisher.py in call_method(self=<__main__.BonitoCGI instance>, method=<bound method BonitoCGI.sortx of <__main__.BonitoCGI instance>>, args=['sortx'], named_args={'attrs': u'word', 'copy_icon': u'1', 'corpname': u'HNK_v30', 'ctxattrs': u'word', 'gdex_enabled': u'1', 'gdexcnt': u'100000', 'pagesize': u'2rand[0,1,1]', 'q': [u'q[word=="mo\u017ee"]', u'e100000 ', u'Fdoc', u'r250', u'r250', u'D', u'D', u'sword/i 1>0~3>0'], 'refs': u'#,doc,=doc.file,=head.type', 'show_gdex_scores': u'1', ...}) |
175 na = named_args.copy()
|
176 correct_types (na, function_defaults (method), 1, safe=0)
|
=> 177 return apply (method, args[1:], na)
|
178
|
179 def call_function (self, func, args, **named_args):
|
builtin apply = <built-in function apply>, method = <bound method BonitoCGI.sortx of <__main__.BonitoCGI instance>>, args = ['sortx'], na = {'sicase': u'i', 'skey': u'rc'} |
/usr/local/lib/python2.7/dist-packages/bonito/CGIPublisher.py in call_function(self=<__main__.BonitoCGI instance>, func=<function get_sort_idx>, args=(<pyconc.PyConc; proxy of <Swig Object of type 'Concordance *' at 0x7f3b91c2c9f0> >,), **named_args={'enc': u'UTF-8'}) |
181 na.update (named_args)
|
182 correct_types (na, function_defaults (func), 1, safe=0)
|
=> 183 return apply (func, args, na)
|
184
|
185 def clone_self (self, safe=1):
|
builtin apply = <built-in function apply>, func = <function get_sort_idx>, args = (<pyconc.PyConc; proxy of <Swig Object of type 'Concordance *' at 0x7f3b91c2c9f0> >,), na = {'enc': u'UTF-8', 'pagesize': u'2rand[0,1,1]', 'q': [u'q[word=="mo\u017ee"]', u'e100000 ', u'Fdoc', u'r250', u'r250', u'D', u'D', u'sword/i 1>0~3>0']} |
/usr/local/lib/python2.7/dist-packages/bonito/conclib.py in get_sort_idx(conc=<pyconc.PyConc; proxy of <Swig Object of type 'Concordance *' at 0x7f3b91c2c9f0> >, q=[u'q[word=="mo\u017ee"]', u'e100000 ', u'Fdoc', u'r250', u'r250', u'D', u'D', u'sword/i 1>0~3>0'], pagesize=u'2rand[0,1,1]', enc=u'UTF-8') |
239 else: just_letters = True
|
240 conc.sort_idx(crit, vals, idx, just_letters)
|
=> 241 out = [(v, pos/pagesize + 1) for v, pos in zip(vals, idx)]
|
242 if just_letters:
|
243 result = []; keys = []
|
out undefined, v = u',\tdo\tdono\u0161enja', pos = 0, pagesize = u'2rand[0,1,1]', builtin zip = <built-in function zip>, vals = <manatee.StrVector; proxy of <Swig Object of type 'Tokens *' at 0x7f3b56e44060> >, idx = <manatee.IntVector; proxy of <Swig Object of type 'std::vector< int > *' at 0x7f3b56e440f0> > |