With this exception
fpdf.errors.FPDFException: The rendering function passed to FPDF.insert_toc_placeholder triggered to many page breaks: page 9 was reached while it was expected to span only 1 pages
Although I checked the code here and it doesn't seem it should fail