cycomanic / Menextract2pdf

Extract Mendely annotations to PDF FIles
GNU General Public License v3.0
35 stars 15 forks source link

ImportError: No module named PyPDF2.generic #26

Open ryckiewade opened 3 years ago

ryckiewade commented 3 years ago

image

Hi all, I get this error when running Menextract2pdf - can anyone advise, please?

"ImportError: No module named PyPDF2.generic"

strophios commented 3 years ago

That error means that you don't have the module PyPDF2 installed (or at least not where python can find it). It should be available through pip, though if you want to fuss around with python as little as possible, you can download the package directly from github and put the PyPDF2 folder from it into the src folder in Menextrac2pdf-master.

Also, having just done this, I want to mention two other issues you might run into next. First, something about the argument parsing in the shell script seems to be broken (hence the "Not a directory" output right before the "Traceback" in your screenshot). You can get around this by invoking python yourself and running the .py file instead of the shell script. You'd run python menextract2pdf.py /arg1 /arg2 --overwrite (the .py file is in the src folder). I'll also mention that I had to unquote the file path arguments to get it to work (and I think --overwrite would also be not quoted).

Second, although it's written in python 2.7, I actually wound up running it with python 3.9 (and it appears to have worked fine) because it resolved some file name errors I was having, but your mileage may vary.