How to fix the error: camelot' has no attribute "read_pdf"

314 Views Asked by At

I am working in PyCharm, I am facing this problem and can't fix it.

import camelot
tables = camelot.read_pdf('table.pdf')
print(tables)

enter image description here

Error message: AttributeError: module 'camelot' has no attribute 'read_pdf'

the code is supposed to read tables from the specified PDF file and extract it.

1

There are 1 best solutions below

0
Hari E On

Maybe you installed the wrong module. First uninstall the incorrect module by using pip uninstall camelot

Step 1 : pip install camelot-py
Step 2 : If you facePdfFileReader deprecated error then pip install --upgrade PyPDF2==2.12.1