Skip to content

Import Issue for pdfminer (python 2.7) #37

@ameyamahajan

Description

@ameyamahajan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions