After updating Indico to 2.0 (2.0.3) from 0.99, following Unexpected Exception sometimes occurred.
Probably the URL of https://indico2[.]riken[.]jp/event/2450/program.pdf’ existed in indico 0.99, while the access to the URL in indico 2.0 results Unexpected Exception.
This access came from google bot.
Although this is not severe, is there any solution to avoid this exception ?
subject: Unexpected Exception occurred at indico2[.]riken[.]jp: list index out of range
2018-04-03 01:30:15,224 6ffffbc18a584fcd indico.flask - ERROR errors.py:107 -- list index out of range
Traceback (most recent call last):
File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/flask/util.py", line 114, in wrapper
return obj().process()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 270, in process
res = self._do_process()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/modules/events/controllers/base.py", line 63, in _do_process
return RHEventBase._do_process(self)
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 249, in _do_process
return self._process()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/modules/events/tracks/controllers.py", line 141, in _process
return send_file('program.pdf', BytesIO(pdf.getPDFBin()), 'application/pdf')
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/legacy/pdfinterface/base.py", line 425, in getPDFBin
self._doc.build(self._story, onFirstPage=self.firstPage, onLaterPages=self.laterPages)
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 1213, in build
BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 969, in build
self.handle_flowable(flowables)
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 834, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/frames.py", line 167, in _add
w, h = flowable.wrap(aW, h)
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/paragraph.py", line 1199, in wrap
blPara = self.breakLines(self._wrapWidths)
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/paragraph.py", line 1450, in breakLines
_words = _getFragWords(frags,maxWidth)
File "/opt/indico/.venv/lib/python2.7/site-packages/reportlab/platypus/paragraph.py", line 537, in _getFragWords
w = S[-1]
IndexError: list index out of range
{u'data': {u'get': {},
u'headers': {'Accept': u'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': u'gzip,deflate,br',
'Connection': u'keep-alive',
'From': u'googlebot(at)googlebot.com',
'Host': u'indico2[.]riken[.]jp',
'User-Agent': u'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'},
u'json': None,
u'post': {},
u'url': {'confId': u'2450'}},
u'endpoint': u'tracks.program_pdf',
u'id': '6ffffbc18a584fcd',
u'ip': '66.249.71.132',
u'method': 'GET',
u'referrer': None,
u'rh': 'RHTracksPDF',
u'time': '2018-04-03T01:30:15.293621',
u'url': u'https://indico2[.]riken[.]jp/event/2450/program.pdf',
u'user': None,
u'user_agent': u'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'}