-
Notifications
You must be signed in to change notification settings - Fork 141
Import Issue for pdfminer (python 2.7) #37
Description
I am using this tool for converting some of my pdf files into a bare text file. I encountered the following issue.
`
import slate
Traceback (most recent call last):
File "", line 1, in
File "/Users/ameya/anaconda/envs/webapp_pandas/lib/python2.7/site-packages/slate/init.py", line 48, in
from slate import PDF
File "/Users/ameya/anaconda/envs/webapp_pandas/lib/python2.7/site-packages/slate/slate.py", line 3, in
from pdfminer.pdfparser import PDFParser, PDFDocument
ImportError: cannot import name PDFDocument
with open(' SOME FILE NAME ') as fd:
... doc = slate.PDF(fd)
...
Traceback (most recent call last):
File "", line 2, in
NameError: name 'slate' is not defined
`
I fixed it by downgrading the pdfminer to 20110515 version.
Successfully uninstalled pdfminer-20140328
Successfully installed pdfminer-20110515
I guess the issue of import occurs in following the piece of code:
classes.py