在python中使用tabla模块时出错
subprocess.CalledProcessError:命令'['java','-Dfile.encoding=UTF8'
它在jupyter笔记本中正常运行,但上述错误仅在我尝试使用windows10 CMD中的pyinstaller包在可执行文件上运行时发生
代码是:
import tabula
def x_summary(file):
file = 'path' +file +".pdf"
tables = tabula.read_pdf(file,pages=1,multiple_tables=True)
df_0=tables[0]
return df
print(x_summary(c))
错误:
subprocess.CalledProcessError: Command '['java', '-Dfile.encoding=UTF8', '-jar', 'C:\\Users\\-----\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\tabula\\tabula-1.0.3-jar-with-dependencies.jar', '--pages', '1', '--stream', '--guess', '--format', 'JSON', 'C:\\Users\\----\\Desktop\\PDF_extraction\\----\\-----format\\PDF_Split_JPEGs\\-------.pdf']' returned non-zero exit status 1.
出于隐私考虑,我将一些文件名替换为“----”
目前没有回答
相关问题 更多 >
编程相关推荐