PDFMiner install question

Andreas Perstinger andipersti at gmail.com
Fri Dec 20 10:00:52 CET 2013


Jason Mellone <jason.mellone at gmail.com> wrote:
>I get the following error:
>PS C:\USERS\Python27> .\python.exe .\MyTest.py
>Traceback (most recent call last):
>  File ".\MyTest.py", line 4, in <module>
>    from pdfminer.pdfpage import PDFTextExtractionNotAllowed
>ImportError: cannot import name PDFTextExtractionNotAllowed
>
>
>If I run commenting out the import of "PDFTextExtractionNotAllowed" it
>runs without a problem. Quite odd.

According to the latest version on Github,
"PDFTextExtractionNotAllowed" was moved into the "PDFPage" class, but
the sample code in the docs was obviously not updated.

https://github.com/euske/pdfminer/blob/master/pdfminer/pdfpage.py

So just leave out that line and if you need that exception use
"PDFPage.PDFTextExtractionNotAllowed" instead of
"PDFTextExtractionNotAllowed".

Bye, Andreas



More information about the Python-list mailing list