Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index out of range in write_html #1358

Open
fhmessas opened this issue Feb 12, 2025 · 2 comments
Open

Index out of range in write_html #1358

fhmessas opened this issue Feb 12, 2025 · 2 comments

Comments

@fhmessas
Copy link

Hi everyone,
I have experience a weird list index out of range when calling the write_html() method, after a few tracing I've found it in line 888 in file fpdf\html.py.

The issue happened for the line

ol_type = self.ol_type[self.indent - 1]

A quickly fix on my side was

try: ol_type = self.ol_type[self.indent - 1] except: ol_type = self.ol_type[0]

@fhmessas fhmessas added the bug label Feb 12, 2025
@andersonhc
Copy link
Collaborator

Hi @fhmessas

Would you mind providing a minimal bug-reproduction code snippet, for this issue?

Thanks

@Lucas-C
Copy link
Member

Lucas-C commented Feb 16, 2025

Hi @fhmessas 🙂

Thank you very much for reporting this bug.
We would be happy to fix this, but to do so a minimal code snippet reproducing the bug would be very handy indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants