camelot-dev / camelot-dev/camelot
Using camelot in Google Function
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 546
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 3
Description
Hello, I used camelot in a google function but it gives me this error on Ghostscript:
Traceback (most recent call last):
File "/layers/google.python.runtime/python/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/workspace/tool/thread.py", line 45, in run
tables = camelot.read_pdf(self.path_pdf, pages=str(i + 1), flavor='lattice', backgournd=True, line_scale=40)
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/camelot/io.py", line 113, in read_pdf
tables = p.parse(
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/camelot/handlers.py", line 176, in parse
t = parser.extract_tables(
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/camelot/parsers/lattice.py", line 421, in extract_tables
self.backend.convert(self.filename, self.imagename)
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/camelot/backends/ghostscript_backend.py", line 47, in convert
ghostscript.Ghostscript(*gs_command)
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/ghostscript/__init__.py", line 76, in __init__
self._instance = gs.new_instance()
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/ghostscript/_gsprint.py", line 172, in new_instance
raise GhostscriptError(rc)
ghostscript._gsprint.GhostscriptError: Fatal
And:
Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/ghostscript/__init__.py", line 125, in __del__
self.exit()
File "/layers/google.python.pip/pip/lib/python3.9/site-packages/ghostscript/__init__.py", line 128, in exit
if self._instance:
AttributeError: 'Ghostscript' object has no attribute '_instance'
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with camelot/backends/ghostscript_backend.py and the ghostscript package paths shown in the traceback, then reproduce the failure in the reported Google Function environment. Done means establishing whether the Fatal error is reproducible and documenting a verified resolution or the missing environment detail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100