<type 'exceptions.ValueError'> | Python 2.7.12: /usr/bin/python Fri Jan 27 22:26:37 2023 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/var/www/bonito/run.cgi in |
83 print "</pre>" |
84 else: |
=> 85 BonitoCGI(user=username).run_unprotected (selectorname='corpname') |
86 |
87 # vim: ts=4 sw=4 sta et sts=4 si tw=80: |
BonitoCGI = <class __main__.BonitoCGI>, user undefined, username = None, ).run_unprotected undefined, selectorname undefined |
/usr/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'>) |
239 if self._has_access or path[0] == 'feedback': |
240 methodname, tmpl, result = self.process_method (path[0], path, |
=> 241 named_args) |
242 else: # redirect to login or raise error |
243 methodname = path[0] |
named_args = {'attrs': u'word', 'corpname': u'simtho', 'ctxattrs': u'word', 'q': [u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0', u'sword/i 1>0~3>0'], 'refs': u'=doc.id', 'sicase': u'i', 'skey': u'rc', 'viewmode': u'kwic'} |
/usr/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', 'corpname': u'simtho', 'ctxattrs': u'word', 'q': [u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0', u'sword/i 1>0~3>0'], 'refs': u'=doc.id', 'sicase': u'i', 'skey': u'rc', 'viewmode': u'kwic'}) |
283 return (methodname, |
284 getattr (method, 'template', methodname + '.tmpl'), |
=> 285 self.call_method (method, pos_args, named_args)) |
286 except Exception, e: |
287 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', 'corpname': u'simtho', 'ctxattrs': u'word', 'q': [u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0', u'sword/i 1>0~3>0'], 'refs': u'=doc.id', 'sicase': u'i', 'skey': u'rc', 'viewmode': u'kwic'} |
/usr/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', 'corpname': u'simtho', 'ctxattrs': u'word', 'q': [u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0', u'sword/i 1>0~3>0'], 'refs': u'=doc.id', 'sicase': u'i', 'skey': u'rc', 'viewmode': u'kwic'}) |
148 na = named_args.copy() |
149 correct_types (na, function_defaults (method), 1, safe=0) |
=> 150 return apply (method, args[1:], na) |
151 |
152 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 = {} |
/usr/lib/python2.7/dist-packages/bonito/conccgi.py in sortx(self=<__main__.BonitoCGI instance>, return_q=False) |
869 return lastq |
870 self.q.append (lastq) |
=> 871 return self.view() |
872 |
873 sortx.template = 'view.tmpl' |
self = <__main__.BonitoCGI instance>, self.view = <bound method BonitoCGI.view of <__main__.BonitoCGI instance>> |
/usr/lib/python2.7/dist-packages/bonito/conccgi.py in view(self=<__main__.BonitoCGI instance>, change_gdex=True) |
634 if self.show_gdex_scores: |
635 self.save = 0 |
=> 636 conc = self.call_function (conclib.get_conc, (self._corp(),)) |
637 if not conc.size(): |
638 if self.exceptmethod == 'PREV-CONC': |
conc undefined, self = <__main__.BonitoCGI instance>, self.call_function = <bound method BonitoCGI.call_function of <__main__.BonitoCGI instance>>, global conclib = <module 'conclib' from '/usr/lib/python2.7/dist-packages/bonito/conclib.py'>, conclib.get_conc = <function get_conc>, self._corp = <bound method BonitoCGI._corp of <__main__.BonitoCGI instance>> |
/usr/lib/python2.7/dist-packages/bonito/CGIPublisher.py in call_function(self=<__main__.BonitoCGI instance>, func=<function get_conc>, args=(<manatee.Corpus; proxy of <Swig Object of type 'Corpus *' at 0x7f5bc59afcf0> >,), **named_args={}) |
154 na.update (named_args) |
155 correct_types (na, function_defaults (func), 1, safe=0) |
=> 156 return apply (func, args, na) |
157 |
158 def clone_self (self, safe=1): |
builtin apply = <built-in function apply>, func = <function get_conc>, args = (<manatee.Corpus; proxy of <Swig Object of type 'Corpus *' at 0x7f5bc59afcf0> >,), na = {'_cache_dir': '/var/lib/bonito/cache', 'async': 1, 'debug': None, 'fromp': 1, 'pagesize': 20, 'q': [u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0', u'sword/i 1>0~3>0'], 'samplesize': 10000000, 'save': 1} |
/usr/lib/python2.7/dist-packages/bonito/conclib.py in get_conc(corp=<manatee.Corpus; proxy of <Swig Object of type 'Corpus *' at 0x7f5bc59afcf0> >, minsize=-1, q=(u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0', u'sword/i 1>0~3>0'), fromp=1, pagesize=20, async=1, save=1, _cache_dir='/var/lib/bonito/cache/simtho/', samplesize=10000000, debug=None) |
424 cachefile, pidfile, server = add_to_map (_cache_dir, pid_dir, |
425 subchash, q[:act + 1], |
=> 426 conc.size()) |
427 if type(server) != int: # nobody started the computation yet |
428 conc.save (cachefile) |
conc = <pyconc.PyConc; proxy of <Swig Object of type 'Concordance *' at 0x7f5bc595d540> >, conc.size = <bound method PyConc.size of <pyconc.PyConc; pro...ect of type 'Concordance *' at 0x7f5bc595d540> >> |
/usr/lib/python2.7/dist-packages/bonito/conccache.py in add_to_map(_cache_dir='/var/lib/bonito/cache/simtho/', pid_dir='/var/lib/bonito/cache/simtho//run/', subchash=None, key=(u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0'), size=1) |
46 if kmap is None: |
47 kmap = cPickle.load (f) |
=> 48 ret = uniqname (key, [r for (r,s) in kmap.values()]) |
49 if kmap.has_key ((subchash,key)): |
50 ret, storedsize = kmap [subchash,key] |
ret undefined, global uniqname = <function uniqname>, key = (u'q[word=="\u0721\u0307\u0722"]', u'sword/i -1<0~-3<0', u'p0 0<0 1 [] within <doc id="DadQa\u1e6d:ComLifeAbbaIs" />', u'Fdoc', u'sword/i 0<0~0>0'), r = 'wordXXX#n0001w16', s = 8313, kmap = {None: (u'q[word=="\u071f\u0720"]', u"n0 0<0 1 [] within <d0013'", 2), (None, (u'Rq[word=="\u0712\u071f\u0720"]',)): ('qword\xdc\x92\xdc\x9f\xdc\xa0', 3492), (None, (u'Rq[word=="\u0712\u071f\u0720"]', u'p0 0<0 1 [] within <doc id="PhiloxMab:ComProJohn" />')): ('qword\xdc\x92\xdc\x9f\xdc\xa0#p0001', 62), (None, (u'Rq[word=="\u0712\u071f\u0720"]', u'p0 0<0 1 [] within <doc id="PhiloxMab:ComProJohn" />', u'D')): ('qword\xdc\x92\xdc\x9f\xdc\xa0#p00010', 62), (None, (u'Rq[word=="\u0712\u071f\u0720"]', u'p0 0<0 1 [] within <doc id="PhiloxMab:ComProJohn" />', u'D', u'sword/i 1>0~3>0')): ('qword\xdc\x92\xdc\x9f\xdc\xa0#p00011', 62), (None, (u'Rq[word=="\u0715\u0721\u072b\u071d\u071a\u0710"]',)): ('qword\xdc\x95\xdc\xa1\xdc\xab\xdc\x9d\xdc\x9a\xdc\x90', 3488), (None, (u'Rq[word=="\u0715\u0721\u072b\u071d\u071a\u0710"]', u'n0 0<0 1 [] within <doc id="SevAnt:CathHom" />')): ('qword\xdc\x95\xdc\xa1\xdc\xab\xdc\x9d\xdc\x9a\xdc\x90#n0', 3306), (None, (u'Rq[word=="\u0715\u0721\u072b\u071d\u071a\u0710"]', u'n0 0<0 1 [] within <doc id="SevAnt:CathHom" />', u'r250')): ('qword\xdc\x95\xdc\xa1\xdc\xab\xdc\x9d\xdc\x9a\xdc\x90#n00', 250), (None, (u'Rq[word=="\u0715\u0721\u072b\u071d\u071a\u0710"]', u'n0 0<0 1 [] within <doc id="SevAnt:CathHom" />', u'r250', u'f')): ('qword\xdc\x95\xdc\xa1\xdc\xab\xdc\x9d\xdc\x9a\xdc\x90#n01', 250), (None, (u'Rq[word=="\u0715\u0721\u072b\u071d\u071a\u0710"]', u'sdoc.id/ 0>0')): ('qword\xdc\x95\xdc\xa1\xdc\xab\xdc\x9d\xdc\x9a\xdc\x90#sd', 3488), ...}, kmap.values = <built-in method values of dict object> |
<type 'exceptions.ValueError'>: too many values to unpack
args =
('too many values to unpack',)
message =
'too many values to unpack'