I am using Camelot to extract multiple sections of a PDF by the following command.
cgl_section = camelot.read_pdf(filename, flavor='stream',
table_areas=['35,490,155,483', '53,480,110,470', '117,480,155,470',
'38,469,106,456', '39,454,105,445', '38,430,155,420',
'38,418,77, 410'])
This runs fine when the PDF actually contains data in these areas. But I'm not expecting data in every PDF that is parsed, some are returned empty. I get the following error when the returned data is not a table, and just has one column.
UserWarning: No tables found in table area 1
and
ValueError: min() arg is an empty sequence
I need a way to extract these specific areas in all PDFs but ignore the empty ones after. Need to be able to use the extracted data in an orderly way.
Open to any other suggestions as well
TIA