1

我正在尝试使用解析pdf,tabula-py但我不断收到此错误堆栈-

CalledProcessError(1, ['java', '-Dfile.encoding=UTF8', '-jar', '/home/ubuntu/.local/share/virtualenvs/my-project-9AYKFKDB/lib/python3.6/site-packages/tabula/tabula-1.0.4-jar-with-dependencies.jar', '--pages', 'all', '--lattic

这是代码 -

 import tabula
    @app.route('/test', methods=['GET'])
    def test():
        df = tabula.read_pdf("file.pdf")

当我尝试通过命令行解析pdf时,它可以工作

java -jar /home/ubuntu/.local/share/virtualenvs/my-project-9AYKFKDB/lib/python3.6/site-packages/tabula/tabula-1.0.4-jar-with-dependencies.jar --pages 1 /home/ubuntu/my-project/file.pdf 

我的Pipfile长相是这样的

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
flask = "*"
tabula-py = "*"

[requires]
python_version = "3.6"

请问可能是什么问题?

4

0 回答 0