IndexError: pop from empty list
GlauberF opened this issue · 5 comments
I'm getting this error, detail that in version 2.1.1
I don't get this error and now in version 3.0.4
or 3.0.5
I get the error.
Here is the link to the template with the data that generates the error: https://gist.githubusercontent.com/GlauberF/d6403fea9b5403e2afb44d1a7aea6e00/raw/34d1ec1c0f1e9e04bbbf6deb0b7632f1f6d93619/template.json
in the template, inside report
is the definitions
and the data
field is the fact data I am sending to the report
my environment
reportbro-lib==3.0.5
SQLAlchemy==1.4.46
tornado==6.2
Python 3.7.10
pip 20.2.2 from /usr/lib/python3.7/site-packages/pip (python 3.7)
OS Linux
Error that is on my tornado server.
reportbro_server.py:99: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
report_request.c.created_on < (now - datetime.timedelta(minutes=3))))
Uncaught exception PUT /report/run (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8050', method='PUT', uri='/report/run', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/var/app/current/report-server-py/env/lib64/python3.7/site-packages/tornado/web.py", line 1711, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "reportbro_server.py", line 107, in put
report_file = report.generate_pdf()
File "/var/app/current/report-server-py/env/lib64/python3.7/site-packages/reportbro/reportbro.py", line 621, in generate_pdf
return renderer.render()
File "/var/app/current/report-server-py/env/lib64/python3.7/site-packages/reportbro/reportbro.py", line 83, in render
complete = self.content_band.create_render_elements(0, height, self.context, self.pdf_doc)
File "/var/app/current/report-server-py/env/lib64/python3.7/site-packages/reportbro/containers.py", line 117, in create_render_elements
container_height=container_height, ctx=ctx, pdf_doc=pdf_doc)
File "/var/app/current/report-server-py/env/lib64/python3.7/site-packages/reportbro/elements.py", line 953, in get_next_render_element
content_row.update_group_changed_row_indices()
File "/var/app/current/report-server-py/env/lib64/python3.7/site-packages/reportbro/elements.py", line 1188, in update_group_changed_row_indices
self.group_changed_row_indices.pop(0)
IndexError: pop from empty list
500 PUT /report/run (127.0.0.1) 69.96ms
Hello,
We also had the same error but I don't know the cause. I can't reproduce it on a very simple report.
This error occurs on a complex report with a table control and several groups content.
Do you need the complex report that contains this error ?
Best regards,
@mterceno exact, happens only in complex reports and with groupings.
https://gist.githubusercontent.com/GlauberF/d6403fea9b5403e2afb44d1a7aea6e00/raw/34d1ec1c0f1e9e04bbbf6deb0b7632f1f6d93619/template.json
could you export the report template in a separate gist? the report template should be as small and simple as possible, so it is easier for us to reproduce the issue.
I could now extract the report template but with the test data included in the template the error does not occur. Could you export a report template with test data included which causes the error? this would make testing and fixing this issue much easier for us.
@alhman It is difficult to pass complex models, when the same problem, but the one I sent is causing a problem.
remembering that to test, you have to simulate that it is not a "isTestData":false
test, but that you are passing real data.
And the data field, contains all the real data that generates the problem.