Skip to content

Getting Assert Error on every PDF #35

@sof123

Description

@sof123

Hey just trying to get started with slate using the tutorial and getting this error. I've tried with 3 pdfs now. Just running the basic code from the tutorial:

import slate with open('testpdf3.pdf') as f: print type(f) doc = slate.PDF(f)

And the stack trace:

Traceback (most recent call last):
File "test.py", line 7, in
doc = slate.PDF(f)
File "C:\Users\S\Anaconda2\lib\site-packages\slate\slate.py", line 38, in init
self.doc.set_parser(self.parser)
File "C:\Users\S\Anaconda2\lib\site-packages\pdfminer\pdfparser.py", line 318, in set_parser
self.xrefs = parser.read_xref()
File "C:\Users\S\Anaconda2\lib\site-packages\pdfminer\pdfparser.py", line 747, in read_xref
self.read_xref_from(pos, xrefs)
File "C:\Users\S\Anaconda2\lib\site-packages\pdfminer\pdfparser.py", line 727, in read_xref_from
xref.load(self, debug=self.debug)
File "C:\Users\S\Anaconda2\lib\site-packages\pdfminer\pdfparser.py", line 99, in load
self.load_trailer(parser)
File "C:\Users\S\Anaconda2\lib\site-packages\pdfminer\pdfparser.py", line 107, in load_trailer
assert kwd is self.KEYWORD_TRAILER
AssertionError

I've tried printing kwd and it's always an integer while KEYWORD_TRAILER is 'trailer'
Used this command to install:

pip install --upgrade --ignore-installed slate==0.3 pdfminer==20110515

I'm on Windows, Python 2.7.12

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