I want to use camelot for table extraction but its giving error

697 Views Asked by At
import camelot
tables = camelot.read_pdf(r"F:\testing\sbi_9.pdf", pages="all")

I have also downloaded GhostScript and still showing an error.

DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.

What can I do now?

I also tried it on Google Collab but it's not working. Can anyone give me the proper steps to extract tables using Camelot.

1

There are 1 best solutions below

0
Itération 122442 On

According to this github issue of camelot, a workaround would be to install the missing library:

pip install --upgrade PyPDF2==2.12.1

However, you might want to upgrade your camelot library, because this issue seems to have been fixed in february this year