Closed junkim012 closed 1 year ago
Fixed:
Remove the pdfminer==20191125
line from requirements.txt
.
You should only install pdfminer.six==20221105
, and not together with the pdfminer==20191125
for the pdfminer imports to resolve.
Source: https://github.com/pdfminer/pdfminer.six/issues/570#issuecomment-1219808627
The solution worked for me!
Python version:
Python 3.9.7
pdfminer version:
pdfminer==20191125
from the repo'srequirements.txt
Problem:
After installing all dependencies and running
python example.py
, there are functions in pdfminer that don't exist in the installed library.Error Message:
ImportError: cannot import name 'HOCRConverter' from 'pdfminer.converter' (/Users/junkim/Development/projects/ai/ChatGPT-Paper-Reader/pdf-gpt/lib/python3.9/site-packages/pdfminer/converter.py)
After commenting out the HOCRConverter from
from .converter import ( XMLConverter, HTMLConverter, TextConverter, PDFPageAggregator, HOCRConverter, )
,from .utils import open_filename, FileOrName, AnyIO
also isn't able to import the three functionsopen_filename, FileOrName, and AnyIO
.Would love to figure out what's going wrong and be able to check out the program!