You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Exporting a PDF timetable fails if the user selects the advanced options and ticks 'Print abstract content of all contributions' when an abstract contains too much text.
The user sees the following error message, which is not especially friendly: LayoutError: Flowable <Table@0x7FCA0B097EA8 1 rows x 3 cols(tallest row 4042)> with cell(0,0) containing ' '(526.582677165 x 4042), tallest cell 4042.0 points, too large on page 2 in frame 'normal'(526.582677165 x 773.196850394*) of template 'Later'
To Reproduce
Steps to reproduce the behavior:
Create a new event with a single session.
Create a contribution abstract with a large quantity of text. I generated ~50 paragraphs of lorem ipsum text - this is overkill, but it demonstrates the issue nicely.
Schedule that contribution for a session.
Go to the standard timetable page for the event.
Click 'PDF', and set the 'Advanced timetable' slider to 'yes'
Tick 'Print abstract content of all contributions', and 'Generate'
Expected behavior
Ideally a PDF without error, but a more friendly error message and not emailing an unexpected exception would be better than nothing. I did find https://groups.google.com/g/reportlab-users/c/wlIN3Fsg2VA which suggests it's not likely to be fixed in reportlab any time soon.
Additional context
Full exception from my test instance:
2021-04-19 11:20:37,526 INFO 6974923bae04427b indico.rh GET /event/1/timetable/ [IP=10.0.3.1] [PID=13430] [UID=1]
2021-04-19 11:20:39,782 INFO 9ca39d81354b4da6 indico.rh GET /event/1/timetable/pdf?_=1618831238112 [IP=10.0.3.1] [PID=13434] [UID=1]
2021-04-19 11:20:52,011 INFO 45921e3056bf4cda indico.rh GET /event/1/timetable/pdf?submitted=&advanced=y&document_settings=showCoverPage&document_settings=showTableContents&document_settings=showSessionTOC&contribution_info=showContribId&contribution_info=showAbstract&session_info=useSe
ssionColorCodes&session_info=showSessionDescription&visible_entries=showContribsAtConfLevel&visible_entries=showBreaksAtConfLevel&pagesize=A4&firstPageNumber=1 [IP=10.0.3.1] [PID=13434] [UID=1]
2021-04-19 11:20:52,102 INFO 9773cea304d44646 indico.rh GET /event/1/timetable/pdf?visible_entries=showContribsAtConfLevel&visible_entries=showBreaksAtConfLevel&pagesize=A4&session_info=useSessionColorCodes&session_info=showSessionDescription&document_settings=showCoverPage&document_set
tings=showTableContents&document_settings=showSessionTOC&submitted=&firstPageNumber=1&contribution_info=showContribId&contribution_info=showAbstract&download=1&advanced=y [IP=10.0.3.1] [PID=13430] [UID=1]
2021-04-19 11:20:52,893 ERROR 9773cea304d44646 indico.flask Flowable <Table@0x7FCA0B097EA8 1 rows x 3 cols(tallest row 4042)> with cell(0,0) containing
' '(526.582677165 x 4042), tallest cell 4042.0 points, too large on page 2 in frame 'normal'(526.582677165 x 773.196850394*) of template 'Later'
Traceback (most recent call last):
File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/flask/util.py", line 84, in wrapper
return obj().process()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/rh.py", line 275, in process
res = self._do_process()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/controllers/base.py", line 54, in _do_process
return RHEventBase._do_process(self)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/rh.py", line 245, in _do_process
rv = self._process()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/timetable/controllers/display.py", line 87, in _process
return send_file('timetable.pdf', BytesIO(pdf.getPDFBin()), 'application/pdf')
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/legacy/pdfinterface/base.py", line 641, in getPDFBin
self._doc.multiBuild(self._story, onFirstPage=self.firstPage, onLaterPages=self.laterPages)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/legacy/pdfinterface/base.py", line 550, in multiBuild
SimpleDocTemplate.multiBuild(self, story, maxPasses, canvasmaker=canvasMaker)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 1144, in multiBuild
self.build(tempStory, **buildKwds)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 1292, in build
BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 1057, in build
self.handle_flowable(flowables)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 942, in handle_flowable
raise LayoutError(ident)
LayoutError: Flowable <Table@0x7FCA0B097EA8 1 rows x 3 cols(tallest row 4042)> with cell(0,0) containing
' '(526.582677165 x 4042), tallest cell 4042.0 points, too large on page 2 in frame 'normal'(526.582677165 x 773.196850394*) of template 'Later'
The text was updated successfully, but these errors were encountered:
Describe the bug
Exporting a PDF timetable fails if the user selects the advanced options and ticks 'Print abstract content of all contributions' when an abstract contains too much text.
The user sees the following error message, which is not especially friendly:
LayoutError: Flowable <Table@0x7FCA0B097EA8 1 rows x 3 cols(tallest row 4042)> with cell(0,0) containing ' '(526.582677165 x 4042), tallest cell 4042.0 points, too large on page 2 in frame 'normal'(526.582677165 x 773.196850394*) of template 'Later'
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ideally a PDF without error, but a more friendly error message and not emailing an unexpected exception would be better than nothing. I did find https://groups.google.com/g/reportlab-users/c/wlIN3Fsg2VA which suggests it's not likely to be fixed in reportlab any time soon.
Additional context
Full exception from my test instance:
The text was updated successfully, but these errors were encountered: