jcushman/pdfquery

error with load() order

Closed this issue · 2 comments

pibol commented

Hi,
i don't know if it is one bug but when I try this
`pdf = pdfquery.PDFQuery("d:\Travail\ myPDF.pdf")

document = pdf.load()`

I have this result:
` document = pdf.load()
File "build\bdist.win-amd64\egg\pdfquery\pdfquery.py", line 373, in load

File "build\bdist.win-amd64\egg\pdfquery\pdfquery.py", line 475, in get_tree
File "build\bdist.win-amd64\egg\pdfquery\pdfquery.py", line 596, in
File "build\bdist.win-amd64\egg\pdfquery\pdfquery.py", line 591, in get_layout
File "build\bdist.win-amd64\egg\pdfquery\pdfquery.py", line 639, in _add_annots
TypeError: 'PDFObjRef' object has no attribute 'getitem'`

Bruno

Hi --

This doesn't look like an error with the current version of PDFQuery. Can you confirm that you are running version 0.4.2?

If so, can you provide the PDF that causes the error?

pibol commented

Hi jcushman

You are right. I have tested with an old version. The load() with 0.4.2 works very well.
I am sorry for my mistake.
Bruno