Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Getting NotImplementedError文件使用python pdftables从pdf获取表数据_Python_Pdf - Fatal编程技术网

Getting NotImplementedError文件使用python pdftables从pdf获取表数据

Getting NotImplementedError文件使用python pdftables从pdf获取表数据,python,pdf,Python,Pdf,我使用PythonPDFTables从pdf中获取表数据,并按照git中给出的说明进行操作 但是当我运行代码时 filepath = 'tests.pdf' fileobj = open(filepath,'rb') from pdftables.pdf_document import PDFDocument doc = PDFDocument.from_fileobj(fileobj) 我得到这样的错误 File "<stdin>", line 1, in <

我使用PythonPDFTables从pdf中获取表数据,并按照git中给出的说明进行操作

但是当我运行代码时

filepath = 'tests.pdf'
fileobj = open(filepath,'rb')
from pdftables.pdf_document import PDFDocument
doc = PDFDocument.from_fileobj(fileobj)
我得到这样的错误

       File "<stdin>", line 1, in <module>
       File "pdftables/pdf_document.py", line 53, in from_fileobj
       raise NotImplementedError
文件“”,第1行,在
文件“pdftables/pdf_document.py”,第53行,from_fileobj
引发未实现的错误
有人能帮我解决这个问题吗

如果您查看从_fileobj函数实现
,您可以看到以下注释:

# TODO(pwaller): For now, put fh into a temporary file and call
# .from_path. Future: when we have a working stream input function for
# poppler, use that.
如果我理解正确,您应该使用
from_path
函数,因为
from_fileobj
尚未实现。使用当前代码很容易做到这一点:

filepath = 'tests.pdf'
from pdftables.pdf_document import PDFDocument
doc = PDFDocument.from_path(filepath)