Skip to content
New issue

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

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

Already on GitHub? # to your account

[html] prevent error when parsing an empty table #2140

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

midichef
Copy link
Contributor

Parsing an empty table, like empty-table.html.txt,
using vd -f html empty-table.html.txt, causes this error:

File "/home/midichef/.local/lib/python3.10/site-packages/visidata/loaders/html.py", line 157, in iterload
it = list(list(x) for x in self.rows.pop(0))
IndexError: pop from empty list

This PR checks that the table isn't empty.

@anjakefala anjakefala merged commit 35cdf48 into saulpw:develop Nov 28, 2023
7 of 12 checks passed
@midichef midichef deleted the html_empty_table branch November 29, 2023 10:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants