我正在尝试从一系列 PDF 文件中提取表格,但无法使 tabula-py 工作。我一直在尝试通过 Windows 操作系统上的 Jupyter Notebook 使用它。不幸的是,我也一样
'FileNotFoundError'</p>
每次我尝试使用 read_PDF()。
从到目前为止我在网上找到的内容来看,该错误似乎是在尝试运行 Tabula java 文件时产生的。我已经正确安装了java。
对此的任何帮助将不胜感激。
这是我试图运行的代码:
from tabula import read_pdf
df = read_pdf("https://github.com/tabulapdf/tabula-java/raw/master/src/test/resources/technology/tabula/arabic.pdf")
错误信息:
FileNotFoundError Traceback (most recent call last)
<ipython-input-78-956ad4697ff7> in <module>()
1 from tabula import read_pdf
----> 2 df = read_pdf("https://github.com/tabulapdf/tabula-java/raw/master/src/test/resources/technology/tabula/arabic.pdf")
C:\Program Files\Anaconda3\lib\site-packages\tabula\wrapper.py in read_pdf(input_path, **kwargs)
64
65 try:
---> 66 output = subprocess.check_output(args)
67 finally:
68 if is_url:
C:\Program Files\Anaconda3\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
624
625 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 626 **kwargs).stdout
627
628
C:\Program Files\Anaconda3\lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
691 kwargs['stdin'] = PIPE
692
--> 693 with Popen(*popenargs, **kwargs) as process:
694 try:
695 stdout, stderr = process.communicate(input, timeout=timeout)
C:\Program Files\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds)
945 c2pread, c2pwrite,
946 errread, errwrite,
--> 947 restore_signals, start_new_session)
948 except:
949 # Cleanup if the child failed starting.
C:\Program Files\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1222 env,
1223 cwd,
-> 1224 startupinfo)
1225 finally:
1226 # Child is launched. Close the parent's copy of those pipe