-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown GhostScript error after successful camelot installation #234
Comments
I've seen this issue as well. I've been able to fix the issue by using ghostscript-9.26 installed using apt-get on ubuntu. The 9.53 version seems to be causing the issue with seg faults. |
Having the same issue as stated above, gs-version is 9.26 installed using apt-get on ubuntu. |
Hi All, I hit something similar to this issue #193. The stack trace seems to be pointing to not finding libgs. Have you confirmed that libgs is installed per the docs? See the Camelot docs on how to confirm a working Ghostscript install. Anaconda did not address this until this issue was addressed in Nov 2020, so perhaps the version you are running has not addressed the partial ghostscript build bug in Anaconda? If using apt, consider searching / installing package |
Not sure, I'm getting the ghostscript error (also installed via conda-forge), even though conda install camelot-py "ghostscript<9.52"
# Installed ghostscript 9.22 This doesn't cause the errors any longer. Is this a problem with version 9.5+ of ghostscript, or is it something Camelot tries to do with Ghostscript that has changed? |
Just to confirm can you run the following in your environment:
Do you get similar output or not? If you get a return as above, then you don't have the problem I am describing - it is something new I am not aware of. |
I just tried updating to Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 05:02:46)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from ctypes.util import find_library
In [2]: find_library("gs")
Out[2]: '/opt/miniconda3/envs/myenv/lib/libgs.so.9' It seems that ghostscript starting with version 9.2x or later starts causing these errors in Camelot. Might it be a breaking change that was introduced in ghostscript and Camelot still tries to use some no-longuer functioning api? |
Yes - you may want to use the python gs module and simply open the PDF without using Camelot to isolate the issue a little more. Unfortunately I have limited expertise here. |
Thanks, well hoping someone from the Camelot team will take a look here to fix the issue. |
UPDATE on issue (still persisting with Camelot breaks (Jupyter kernel has to literraly restart) when trying to read PDF with |
Yep only the lattice flavor uses ghostscript. I'll have to figure out a way to reproduce this issue. |
Meanwhile, can you try installing the latest version with
More info in the docs here: https://camelot-py.readthedocs.io/en/master/user/advanced.html#use-alternate-image-conversion-backends |
was running into this same issue with ghostscript 9.50, lattice flavour would immediately crash python or jupyter with:
changing to
stopped this and I managed to parse my PDFs with no issues thus far. |
Hello,
I am currently on an Amazon EC2 Linux machine and have installed
camelot
through Anaconda withconda install -c conda-forge camelot-py
. The installation happened without any issues. I could see Ghostscript as part of the dependencies being installed through Anaconda.Afterwards, I attempted to extract the table from the example foo.pdf. From the documentation, this should be a simple
tables = camelot.read_pdf('foo.pdf')
. However, immediately after running that command, I received the following long error.That number at the end appears to be change every time I run the command. It stays in that general area of -700 million. The error was when I was in a Jupyter Notebook. Running this while on the pure command line simply prints out a
Segmentation Fault
. Downgrading the Python version from 3.8 to 3.6 did not fix the issue.I tried to see if this was a GhostScript problem, but running
worked as intended and I could see the text document all nicely formatted. I am unsure as to what the problem could be at this point. Any help is appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: