camelot-dev / camelot

A Python library to extract tabular data from PDFs
https://camelot-py.readthedocs.io
MIT License
2.77k stars 446 forks source link

PyPDF? #436

Open text2sql opened 9 months ago

text2sql commented 9 months ago

I keep getting this error: DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead. I did the --upgrade Thank you

noor-soreti commented 9 months ago

Uninstall PyPDF and install an earlier version. If you're using pip do this: pip uninstall PyPDF2 pip install PyPDF2==1.26.0

text2sql commented 9 months ago

thanks, now it shows another error even though i properly install ghostscript and also did brew link --overwrite ghostscript as per this issue

Screenshot 2023-10-02 at 4 57 03 PM
noor-soreti commented 9 months ago

can you share the steps you took for the installation and your environment set up?

text2sql commented 9 months ago

pip install, brew install , reinstall , updated the paths , let me know what specific info do you need the ghostscript is installed but camelot does not see it no matter what

noor-soreti commented 9 months ago

environment set up like are you running it locally or on jupyter or colab. if locally, what are you using? also wouldn't hurt to check your dependency installation versions with brew list and pip list. could provide some insight

text2sql commented 9 months ago

jupyter notebook, installed ghostscript with brew, brew list shows ghostscript installed , my intuition is that it is the conflict between the paths to ghostscript in camelot and in my system, although i did update the path in jupyter with gs_path = '/opt/homebrew/bin/gs'
in case this is of help: OSError: dlopen(libgs.so, 0x0006): tried: 'libgs.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgs.so' (no such file), '/Users/pinoccio/anaconda3/lib/python3.11/lib-dynload/../../libgs.so' (no such file), '/Users/pinoccio/anaconda3/bin/../lib/libgs.so' (no such file), '/usr/lib/libgs.so' (no such file, not in dyld cache), 'libgs.so' (no such file), '/usr/local/lib/libgs.so' (no such file), '/usr/lib/libgs.so' (no such file, not in dyld cache)

text2sql commented 9 months ago

i don't have libgs.so anywhere

thinh-huynh-re commented 9 months ago

Seem like the latest version camelot-py 0.11.0 (Feb 26, 2023) does not work for me. I have to install directly from the repository, by doing:

git clone https://github.com/camelot-dev/camelot
cd camelot
pip install -e .

also, you may need to install ghostscript (pip install ghostscript ).

legaltextai commented 9 months ago

the Apple M1 might be using different installation paths, hence the problem?

legaltextai commented 9 months ago

I 've managed to change the paths and run in the Terminal. It's working. The Jupyter still shows errors, but that's OK. Thank you for your help.