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編程
如果方法有用,請點個贊,方便后面遇到這個錯誤的人識別好的解決方法
總結
以上是生活随笔為你收集整理的Cannot find reference ‘PDFDocument‘ in ‘pdfparser.py‘的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 手把手教你使用Python生成图灵智能小
- 下一篇: *** FATAL ERROR: too