Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62430

Re: PDFMiner install question

Date 2013-12-20 10:00 +0100
From Andreas Perstinger <andipersti@gmail.com>
Subject Re: PDFMiner install question
References (1 earlier) <mailman.4310.1387312378.18130.python-list@python.org> <89e3b06c-90d7-4cc5-8367-03c916a4dfcb@googlegroups.com> <472d91fe-2ddb-4a78-8a44-6b171f436903@googlegroups.com> <mailman.4313.1387323018.18130.python-list@python.org> <5460059c-c805-40e3-bd3c-ac2ca677f0f7@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.4432.1387530057.18130.python-list@python.org> (permalink)

Show all headers | View raw


Jason Mellone <jason.mellone@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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

PDFMiner install question Jason Mellone <jason.mellone@gmail.com> - 2013-12-17 12:06 -0800
  Re: PDFMiner install question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-17 20:27 +0000
  Re: PDFMiner install question MRAB <python@mrabarnett.plus.com> - 2013-12-17 20:32 +0000
    Re: PDFMiner install question Jason Mellone <jason.mellone@gmail.com> - 2013-12-17 12:53 -0800
      Re: PDFMiner install question Jason Mellone <jason.mellone@gmail.com> - 2013-12-17 12:59 -0800
        Re: PDFMiner install question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-17 22:03 +0000
        Re: PDFMiner install question MRAB <python@mrabarnett.plus.com> - 2013-12-17 23:30 +0000
          Re: PDFMiner install question Jason Mellone <jason.mellone@gmail.com> - 2013-12-19 11:36 -0800
            Re: PDFMiner install question MRAB <python@mrabarnett.plus.com> - 2013-12-19 21:18 +0000
            Re: PDFMiner install question Andreas Perstinger <andipersti@gmail.com> - 2013-12-20 10:00 +0100

csiph-web