我正在尝试使用camelot(命令行界面)从pdf提取表格数据,并且出现以下错误。
代码段:
camelot --format excel --output test2.xls lattice "UTI Brokerage Structure.pdf
错误:
2019-07-12T11:26:04 - INFO - Processing page-1
Traceback (most recent call last):
File "D:\NividousRPA\RPAStudio\python27\Scripts\camelot-script.py", line 9, in <module>
load_entry_point('camelot-py==0.7.3', 'console_scripts', 'camelot')()
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\cli.py", line 205, in lattice
filepath, pages=pages, flavor="lattice", suppress_stdout=quiet, **kwargs
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\io.py", line 117, in read_pdf
**kwargs
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\handlers.py", line 172, in parse
p, suppress_stdout=suppress_stdout, layout_kwargs=layout_kwargs
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\parsers\lattice.py", line 403, in extract_tables
self._generate_image()
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\parsers\lattice.py", line 212, in _generate_image
from ..ext.ghostscript import Ghostscript
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\ext\ghostscript\__init__.py", line 24, in <module>
from . import _gsprint as gs
File "d:\nividousrpa\rpastudio\python27\lib\site-packages\camelot\ext\ghostscript\_gsprint.py", line 247, in <module>
raise RuntimeError("Please make sure that Ghostscript is installed")
RuntimeError: Please make sure that Ghostscript is installed
我已经安装了Ghostscript,并且可以在PATH环境变量中使用它。
请在下面找到版本详细信息:
另外,请检查以下链接中提及的所有依赖关系, Camelot Dependencies
我用'stream'尝试了相同的命令,但可以使用'lattice'。
请帮助解决此问题。
谢谢