camelot
camelot copied to clipboard
NotImplementedError: File format not supported
for some pdf links i am getting this error NotImplementedError: File format not supported
[<ipython-input-11-0615a449639b>](https://localhost:8080/#) in <cell line: 1>()
----> 1 tables = camelot.read_pdf('https://downloads.usda.library.cornell.edu/usda-esmis/files/cj82k728n/2v23wr658/v405t658m/wwcb2921.pdf', pages='1', flavor='lattice')
2 frames
[/usr/local/lib/python3.10/dist-packages/camelot/utils.py](https://localhost:8080/#) in download_url(url)
87 content_type = obj.info().get_content_type()
88 if content_type != "application/pdf":
---> 89 raise NotImplementedError("File format not supported")
90 f.write(obj.read())
91 filepath = os.path.join(os.path.dirname(f.name), filename)
NotImplementedError: File format not supported
Steps to reproduce the bug run below code to reproduce the error.
tables = camelot.read_pdf('https://downloads.usda.library.cornell.edu/usda-esmis/files/cj82k728n/2v23wr658/v405t658m/wwcb2921.pdf', pages='1', flavor='lattice')
Expected behavior
list of tables was expected
https://downloads.usda.library.cornell.edu/usda-esmis/files/cj82k728n/2v23wr658/v405t658m/wwcb2921.pdf
Screenshots
Environment
Linux-6.1.85+-x86_64-with-glibc2.35 Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] NumPy 1.26.4 OpenCV 4.10.0 Camelot 0.8.2
also tried Linux-6.1.85+-x86_64-with-glibc2.35 Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] NumPy 1.26.4 OpenCV 4.10.0 Camelot 0.9.0
and Linux-6.1.85+-x86_64-with-glibc2.35 Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] NumPy 1.26.4 OpenCV 4.10.0 Camelot 0.11.0