Size=x' data error - 2 rows in data but 1 row heights

I get the following error when trying to upload an image and load it in a pdf with xhtml2pdf with a template, when viewing it in the admin it appears correct, but in the pdf it gives me the error

ValueError at /multas/ <PmlTable@0x1F3B48B4320 2 rows x 1 cols> with cell(0,0) containing <PmlKeepInFrame at 0x1f3b48b4680> size=x data error - 2 rows in data but 1 row heights

Request Method: GET Request URL: http://localhost:8080/multas/?id=33 Django Version: 3.2 Exception Type: ValueError Exception Value: <PmlTable@0x1F3B48B4320 2 rows x 1 cols> with cell(0,0) containing '<PmlKeepInFrame at 0x1f3b48b4680> size=x' data error - 2 rows in data but 1 row heights Exception Location: C:\Users\user\PycharmProjects\simertg\venv\Lib\site-packages\reportlab\platypus\tables.py, line 319, in __init__ Python Executable: C:\Users\user\PycharmProjects\simertg\venv\Scripts\python.exe Python Version: 3.12.2

enter image description here

Unfortunately the error information does not include a line number or block id which would help to identify where the actual error occurred. All I can recommend is to check that your table header rows match the number of detail rows. I got a similar error when I tried to use additional table rows for spacing in my heading.

"<tr/tr> {{plan.name}}</> "<tr/tr>"

when I removed the additional "tr's" the code converted correctly

Back to Top