Jason Mellone <jason.mell...@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 -- https://mail.python.org/mailman/listinfo/python-list