Skip to content

lowers.append(projection_threshold[0]) IndexError: list index out of range #3

@mosesmc52

Description

@mosesmc52

Hi Chrisdev,

I'm using your pdftable library to extract and format tables from the following PDF.
http://elibrary.ferc.gov/idmws/common/opennat.asp?fileID=13517611

However, I'm experiencing the following error while parsing page 13.

File "libs/form6_parser.py", line 16, in read_file
tables = get_tables(f)
File "/Users/mosesmccall/.virtualenvs/form6/lib/python2.7/site-packages/pdftables/pdftables.py", line 85, in get_tables
atomise=True)
File "/Users/mosesmccall/.virtualenvs/form6/lib/python2.7/site-packages/pdftables/pdftables.py", line 529, in page_to_tables
x_comb = comb_from_projection(column_projection, columnThreshold, "column")
File "/Users/mosesmccall/.virtualenvs/form6/lib/python2.7/site-packages/pdftables/pdftables.py", line 244, in comb_from_projection
lowers.append(projection_threshold[0])
IndexError: list index out of range

I suspect the error occurred because the 0th index of the list projection_threshold list is empty and there is handling for an empty list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions