camelot python;OSError: exception: access violation writing 0x00000080


I was trying to extract tables from a PDF file with Camelot.

Here is my code:

import camelot
tables = camelot.read_pdf('foo.pdf')

and I am getting the error while running this script as follows:

  File "C:/Users/gibin/PycharmProjects/ML/", line 20, in <module>
    table=tables = camelot.read_pdf(r"C:\Users\gibin\PycharmProjects\ML\Doc_downloader\GWC_Docs\781313686.pdf")
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\", line 117, in read_pdf
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\", line 172, in parse
    p, suppress_stdout=suppress_stdout, layout_kwargs=layout_kwargs
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\parsers\", line 403, in extract_tables
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\parsers\", line 220, in _generate_image
    with Ghostscript(*gs_call, stdout=null) as gs:
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\ext\ghostscript\", line 95, in Ghostscript
    stderr=kwargs.get("stderr", None),
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\ext\ghostscript\", line 39, in __init__
    rc = gs.init_with_args(instance, args)
  File "C:\Users\gibin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\ext\ghostscript\", line 169, in init_with_args
    rc = libgs.gsapi_init_with_args(instance, len(argv), c_argv)

OSError: exception: access violation writing 0x00000080

Process finished with exit code 1

How can I solve this, or is there another way to get tables from PDF?

Edit: The same script is working fine in jupyter notebook, but not working in pycharm.

asked on Stack Overflow Oct 23, 2019 by m.gibin • edited Oct 24, 2019 by m.gibin

1 Answer


Did you install Camelot via the PyPI repository, i.e. pip install camelot-py[cv]?

I stopped getting this error after I re-installed Camelot from source:

git clone
cd camelot
pip install ".[cv]"


answered on Stack Overflow Jan 29, 2020 by browly

User contributions licensed under CC BY-SA 3.0