You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am trying to read tables in a pdf with multiple columns, and this is the output error I get.
Type "help", "copyright", "credits" or "license" for more information.
>>> import camelot
>>> tables = camelot.read_pdf('/Users/sgudisa/Desktop/FashionReport_2019_46-63.pdf')
Traceback (most recent call last):
File "//anaconda3/lib/python3.7/site-packages/camelot/ext/ghostscript/_gsprint.py", line 251, in <module>
libgs = cdll.LoadLibrary("libgs.so")
File "//anaconda3/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
return self._dlltype(name)
File "//anaconda3/lib/python3.7/ctypes/__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libgs.so, 6): image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "//anaconda3/lib/python3.7/site-packages/camelot/io.py", line 117, in read_pdf
**kwargs
File "//anaconda3/lib/python3.7/site-packages/camelot/handlers.py", line 172, in parse
p, suppress_stdout=suppress_stdout, layout_kwargs=layout_kwargs
File "//anaconda3/lib/python3.7/site-packages/camelot/parsers/lattice.py", line 403, in extract_tables
self._generate_image()
File "//anaconda3/lib/python3.7/site-packages/camelot/parsers/lattice.py", line 212, in _generate_image
from ..ext.ghostscript import Ghostscript
File "//anaconda3/lib/python3.7/site-packages/camelot/ext/ghostscript/__init__.py", line 24, in <module>
from . import _gsprint as gs
File "//anaconda3/lib/python3.7/site-packages/camelot/ext/ghostscript/_gsprint.py", line 258, in <module>
raise RuntimeError("Please make sure that Ghostscript is installed")
RuntimeError: Please make sure that Ghostscript is installed
>>> gs -version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'gs' is not defined
>>> exit()
(base) Srujans-MacBook-Air:~ sgudisa$ gs -version
GPL Ghostscript 9.22 (2017-10-04)
Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
(base) Srujans-MacBook-Air:~ sgudisa$
I see two errors in the output, an OSERRO 'dlopen : image not found' and other is the ghostscript not available. I've checked using the gs -version command and I see that ghostscript being available. Attaching the pdf file that I am trying to readout. So far i understand that the lattice option can read out the pdf tables but I couldn't even come upto there.
I have to hack camelot/ext/ghostscript/_gsprint.py
else:
try:
libgs = cdll.LoadLibrary("libgs.so")
except OSError:
# shared object file not found
import ctypes.util
libgs = ctypes.util.find_library("/usr/local/Cellar/ghostscript/9.53.3/lib/libgs") # <-- hack
if not libgs:
raise RuntimeError("Please make sure that Ghostscript is installed")
libgs = cdll.LoadLibrary(libgs)
Hi I am trying to read tables in a pdf with multiple columns, and this is the output error I get.
I see two errors in the output, an OSERRO 'dlopen : image not found' and other is the ghostscript not available. I've checked using the gs -version command and I see that ghostscript being available. Attaching the pdf file that I am trying to readout. So far i understand that the lattice option can read out the pdf tables but I couldn't even come upto there.
FashionReport_2019_46-63.pdf
The text was updated successfully, but these errors were encountered: