Skip to content

fix(pdf): avoid UnboundLocalError in extract_table_data when table-wrap has no table#1219

Open
SAY-5 wants to merge 1 commit into
scieloorg:masterfrom
SAY-5:fix-table-data-unbound-spans
Open

fix(pdf): avoid UnboundLocalError in extract_table_data when table-wrap has no table#1219
SAY-5 wants to merge 1 commit into
scieloorg:masterfrom
SAY-5:fix-table-data-unbound-spans

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 13, 2026

Copy link
Copy Markdown

Corrige o #1213. Quando um table-wrap não possui <table> (por exemplo, traz apenas <graphic>), header_spans e row_spans ficavam sem atribuição e o return final lançava UnboundLocalError. Inicializei ambas como listas vazias antes do bloco if table is not None, junto com headers/rows. Incluí um teste cobrindo o caso de table-wrap sem table.

…ap has no table

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant