Cannot find reference ‘PDFDocument‘ in ‘pdfparser.py‘

问题描述:
报错原文: Cannot find reference ‘PDFDocument’ in ‘pdfparser.py’
This inspection detects names that should resolve but don’t. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.
翻译:
在“pdfparser”中找不到参考PDFDocument.py’
该检查检测应该解析但没有解析的名称。由于动态分派和duck类型,这在有限但有用的情况下是可能的。顶级和类级别的项比实例项受到更好的支持。

问题原因:
参考资料链接
原文: 2013/11/13: Bugfixes and minor improvements.
As of November 2013, there were a few changes made to the PDFMiner API prior to October 2013. This is the result of code restructuring. Here is a list of the changes:
PDFDocument class is moved to pdfdocument.py.
翻译:
2013/11/13: bug修复和小的改进。
到2013年11月,PDFMiner API在2013年10月之前有一些变化。这是代码重组的结果。以下是一些变化:
将PDFDocument类移动到PDFDocument .py。

解决方法:

原:from pdfminer.pdfparser import  PDFDocument
改:from pdfminer.pdfdocument import PDFDocument

用PDFMiner编程


如果方法有用,请点个赞,方便后面遇到这个错误的人识别好的解决方法

  • 7
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值