Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Issue for pdfminer (python 2.7) #37

Open
ameyamahajan opened this issue Apr 21, 2017 · 1 comment
Open

Import Issue for pdfminer (python 2.7) #37

ameyamahajan opened this issue Apr 21, 2017 · 1 comment

Comments

@ameyamahajan
Copy link

ameyamahajan commented Apr 21, 2017

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

@jangdan
Copy link

jangdan commented Feb 12, 2018

perhaps related to #6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants