kanzure / pdfparanoia

pdf watermark removal library for academic papers
https://pypi.python.org/pypi/pdfparanoia
533 stars 52 forks source link

pip installation fails on Python 3 #53

Closed MartinThoma closed 4 years ago

MartinThoma commented 4 years ago

Error message

$ pip install pdfparanoia
Collecting pdfparanoia
  Downloading pdfparanoia-0.0.16.tar.gz (11 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/math/.pyenv/versions/3.8.4/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4vx4ol8y/pdfparanoia/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4vx4ol8y/pdfparanoia/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-5pr1ds0e
         cwd: /tmp/pip-install-4vx4ol8y/pdfparanoia/
    Complete output (14 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4vx4ol8y/pdfparanoia/setup.py", line 6, in <module>
        import pdfparanoia
      File "/tmp/pip-install-4vx4ol8y/pdfparanoia/pdfparanoia/__init__.py", line 27, in <module>
        from .core import scrub
      File "/tmp/pip-install-4vx4ol8y/pdfparanoia/pdfparanoia/core.py", line 20, in <module>
        from pdfparanoia.plugins import *
      File "/tmp/pip-install-4vx4ol8y/pdfparanoia/pdfparanoia/plugins/__init__.py", line 12, in <module>
        from .jstor import *
      File "/tmp/pip-install-4vx4ol8y/pdfparanoia/pdfparanoia/plugins/jstor.py", line 98
        except PDFObjectNotFound, e:
                                ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

System information

kanzure commented 4 years ago

You'll have to try the local development version, which does not use that syntax. Btw, this library is unmaintained and hasn't been properly upgraded to python3.8+. There's a lot of work to do to get this to work again. Contributors welcome.