I am trying to extract tables from pdf using camelot and I get this attribute error. Could you please help?
import camelot
import pandas as pd
pdf = camelot.read_pdf("Gordian.pdf")
AttributeError Traceback (most recent call last) in ----> 1 pdf = camelot.read_pdf("Gordian.pdf")
AttributeError: module 'camelot' has no attribute 'read_pdf'
Try this: import camelot.io as camelot
That worked for me.
NOTE : If you are using virtual environment activate environment before do this things.
I have already faced this error.There is a no bug in your code.The problem is with camelot installation.
1 remove installed camelot version
2 install again using this command. There is a multiple ways to install camelot. Please try it one by one
pip install camelot-py
pip install camelot-py[cv]
pip install camelot-py[all]
3 run your code >> i have attached sample code here
import camelot
data = camelot.read_pdf("test_file.pdf", pages='all')
print(data)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With