Python 3.x 获得';被调用的进程错误。。。。返回非零退出状态1';在python 3.6上运行tabla.read_pdf()函数

Python 3.x 获得';被调用的进程错误。。。。返回非零退出状态1';在python 3.6上运行tabla.read_pdf()函数,python-3.x,tabula,python-camelot,Python 3.x,Tabula,Python Camelot,我已经尝试了所有可能的选择。请帮忙 在python中运行tabla的read_pdf()时出现以下错误。错误是 CalledProcessError: Command '['java', '-Dfile.encoding=UTF8', '-jar', 'D:\\Transfer_Folder\\WPy-3661\\python-3.6.6.amd64\\lib\\site-packages\\tabula\\tabula-1.0.3-jar-with-dependencies.jar', '--

我已经尝试了所有可能的选择。请帮忙

在python中运行tabla的read_pdf()时出现以下错误。错误是

CalledProcessError: Command '['java', '-Dfile.encoding=UTF8', '-jar', 'D:\\Transfer_Folder\\WPy-3661\\python-3.6.6.amd64\\lib\\site-packages\\tabula\\tabula-1.0.3-jar-with-dependencies.jar', '--pages', 'all', '--guess', '--format', 'JSON', '--outfile', 'C:\\Users\\guptac\\AppData\\Local\\Temp\\tmpqu_wgv1o', 'C:/Users/guptac/Desktop/1409.3215.pdf']' returned non-zero exit status 1.
运行
tabla.environment\u info()时

我得到以下信息:

Python version:
    3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]
Java version:
    java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
tabula-py version: 1.4.0
platform: Windows-10-10.0.17763-SP0
uname:
    uname_result(system='Windows', node='Guptacdt02', release='10', version='10.0.17763', machine='AMD64', processor='Intel64 Family 6 Model 158 Stepping 9, GenuineIntel')
linux_distribution: ('MSYS_NT-10.0-WOW', '2.10.0', '')
mac_ver: ('', ('', '', ''), '')
我已经尝试将我的程序文件(即我在桌面上编写的名为untitled0.py的上述代码)和我试图在桌面上处理的文本文件保存起来。我从Stackoverflow中看到了无数的选择,比如用Java7代替Java8可以解决我的问题,升级tabla包(我发现它已经是最新版本),我的Java也得到了更新。有人在另一篇帖子的评论中说,要把代码和pdf文件保存在同一个目录中,我这样做了,但没有用。上面的错误消息一次又一次地出现

import tabula

df = tabula.read_pdf('C:/Users/guptac/Desktop/1409.3215.pdf',pages='all',encoding = 'utf-8',multiple_tables=True)
错误消息:

CalledProcessError: Command '['java', '-Dfile.encoding=UTF8', '-jar', 'D:\\Transfer_Folder\\WPy-3661\\python-3.6.6.amd64\\lib\\site-packages\\tabula\\tabula-1.0.3-jar-with-dependencies.jar', '--pages', 'all', '--guess', '--format', 'JSON', '--outfile', 'C:\\Users\\guptac\\AppData\\Local\\Temp\\tmpqu_wgv1o', 'C:/Users/guptac/Desktop/1409.3215.pdf']' returned non-zero exit status 1.
预期成果: 我应该能够解析多个表,或者我应该说从作为输入提供给数据库的pdf文档中提取多个表

tabula.read_pdf()

更新: 如图所示运行:没有任何好处。请参阅下面的错误


D:\Transfer_Folder\WPy-3661\python-3.6.6.amd64\Lib\site-packages>java -jar'D:\\Transfer_Folder\\WPy-3661\\python-3.6.6.amd64\\lib\\site-packages\\tabula\\tabula-1.0.3-jar-with-dependencies.jar', '--pages', 'all', '--guess', '--format', 'JSON', '--outfile', 'C:\\Users\\guptac\\AppData\\Local\\Temp\\tmpi1dv4lz7', '1409.3215.pdf'
Unrecognized option: -jar'D:\\Transfer_Folder\\WPy-3661\\python-3.6.6.amd64\\lib\\site-packages\\tabula\\tabula-1.0.3-jar-with-dependencies.jar',
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

更新:

我下载的文件的来源是:

更新 我也查看了此处发布的解决方案,但不太明白他们建议的解决方案:

更新


我已经放弃了对tabla的希望。我使用的是卡米洛特
好多了。

很抱歉回复太晚,我知道您已经使用camelot而不是表格,但仅供找到此主题的人参考

正是Windows上的问题引入了v1.4.0。Table py v1.4.1应该可以解决这个问题。

我仍然有这个问题。我检查了版本及其1.4.1