bordaigorl / remy

Remy, an online&offline manager for the reMarkable tablet
GNU General Public License v3.0
282 stars 13 forks source link

PyPDF2 #35

Closed xade93 closed 1 year ago

xade93 commented 2 years ago

Hi,

After recent updates, I find the program unable to bootstrap due to

File "/home/pityhero/bin/remy/remy/remarkable/export.py", line 9, in from PyPDF2.pdf import PageObject ModuleNotFoundError: No module named 'PyPDF2.pdf'

I have the PyPDF2 properly installed and configured, it just seems like they changed the API.

Thanks.

bordaigorl commented 2 years ago

The devel branch is compatible with PyPDF2 1.28 (see #34 ) but not with higher versions. I am planning to migrate to PyMuPDF so I will probably not try to be compatible with the new PyPDF2 releases. The easiest way to deal with this for the moment is to downgrade PyPDF2. You can use a virtual environment so that only Remy uses the old version.

corle3421 commented 2 years ago

Hi,

maybe a dirty workaround, but you can change the import of pypdf (line 9 and 10 of the export.py) to

from PyPDF2 import PageObject from PyPDF2.errors import PdfReadError

also you need to change line 107 form: np.mergeRotatedScaledTranslatedPage(bp, rot, ratio, tx, ty) to np.mergeRotatedScaledTranslatedPage(bp, rot, ratio, float(tx), float(ty))

Than the tool works absolut fine for me.