camelot-dev / camelot-dev/camelot

Can you please help? ( Error: No tables found on page-1 [stream.py:453] )

Open
#267 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.8k
Forks
546
Avg merge
3d 17h
Merged PRs (30d)
3

Description

Hello Experts,

I am suffering from an issue that Camelot said there is no table found. Can you please help, thank you so much!!!

The code I wrote is as follows:
###########################################################################################
import camelot
import pandas as pd

outdf = pd.DataFrame()

filepath = 'D:\GS_ 20210731_P9.pdf'
flavor = 'stream'
table = camelot.read_pdf(filepath = filepath,flavor = flavor)

out = table[0].df

outdf = outdf.append(out)
###########################################################################################

The error I encountered is as follows:
###########################################################################################
UserWarning: No tables found on page-1 [stream.py:453]
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
15 table = camelot.read_pdf(filepath = filepath,flavor = flavor)
16
---> 17 out = table[0].df
18
19 outdf = outdf.append(out)

c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\camelot\core.py in __getitem__(self, idx)
687
688 def __getitem__(self, idx):
--> 689 return self._tables[idx]
690
691 @staticmethod

IndexError: list index out of range
###########################################################################################

###########################################################################################

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported call in stream.py:453 and reproduce the warning using the supplied Camelot code and PDF if it is available. Check why no tables are returned before table[0].df is accessed; done means the reported input is handled without the empty-list IndexError and table extraction behavior is clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.