camelot-dev / camelot-dev/excalibur
Unable to process PDFs, throws GhostscriptError: -100 on refresh page (mac OS)
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Description
I've been trying to work in a private repository first. I forked the repository by first duplicating it and setting it to private via instructions from top answer here (https://stackoverflow.com/questions/10065526/github-how-to-make-a-fork-of-public-repository-private). Whenever I try to process PDFs, I get a GhostScript error on a mac OSX.
I am using:
Python 3.7
GPL Ghostscript 9.27 [via homebrew]
opencv: stable 4.1.0 (bottled) [via homebrew]
numpy 1.14.5
excalibur 0.4.2
I'm simply trying to run it locally via flask run and have already set up my own mySQL database as per excalibur documentation. It throws the error after I upload the PDF and go to the next page (makes it to the refresh page then throws the error there). I've tried many different PDFs with the same result including empty pages.
127.0.0.1 - - [09/Jul/2019 09:14:01] "GET /static/css/vendor/jquery-ui.structure.min.css HTTP/1.1" 200 -
127.0.0.1 - - [09/Jul/2019 09:14:01] "GET /static/css/workspace.css HTTP/1.1" 200 -
127.0.0.1 - - [09/Jul/2019 09:14:01] "GET /static/js/vendor/jquery.selectareas.min.js HTTP/1.1" 200 -
127.0.0.1 - - [09/Jul/2019 09:14:01] "GET /static/js/workspace.js HTTP/1.1" 200 -
127.0.0.1 - - [09/Jul/2019 09:14:01] "GET /static/js/vendor/jquery-ui.min.js HTTP/1.1" 200 -
**GPL Ghostscript 9.27: Unrecoverable error, exit code 1
ERROR:root:-100
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/excalibur/tasks.py", line 44, in split
with Ghostscript(*gs_call, stdout=null) as gs:
File "/usr/local/lib/python3.7/site-packages/camelot/ext/ghostscript/__init__.py", line 93, in Ghostscript
stderr=kwargs.get('stderr', None))
File "/usr/local/lib/python3.7/site-packages/camelot/ext/ghostscript/__init__.py", line 39, in __init__
rc = gs.init_with_args(instance, args)
File "/usr/local/lib/python3.7/site-packages/camelot/ext/ghostscript/_gsprint.py", line 169, in init_with_args
raise GhostscriptError(rc)
camelot.ext.ghostscript._gsprint.GhostscriptError: -100**

Any help solving this would be appreciated.
Contributor guide
Research direction
Start by reproducing the PDF upload and refresh flow with the listed Python, Ghostscript, OpenCV, NumPy, and Excalibur versions. Read excalibur/tasks.py and the camelot.ext.ghostscript files named in the traceback, focusing on the Ghostscript invocation. Done means the reported PDFs process successfully on macOS, or the compatibility cause and required setup are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, numpy, opencv, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100