Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails tests - No module named 'PyPDF2.pdf' #90

Open
benkohler opened this issue Jul 26, 2022 · 1 comment
Open

Fails tests - No module named 'PyPDF2.pdf' #90

benkohler opened this issue Jul 26, 2022 · 1 comment

Comments

@benkohler
Copy link

Building from a snapshot from March 30, stapler is failing tests. It looks like "from PyPDF2.pdf" should be "from PyPDF2". Are some other distros installing it as PyPDF2.pdf? None that I can see, but maybe.

======================================================================
ERROR: staplelib.tests (unittest.loader._FailedTest)

ImportError: Failed to import test module: staplelib.tests
Traceback (most recent call last):
File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
import(name)
File "/var/tmp/portage/dev-python/stapler-1.0.0_p20220330/work/stapler-382f1edc62296e071093a5419811a2fca9d78d93/staplelib/tests.py", line 8, in
from PyPDF2.pdf import PdfFileReader
ModuleNotFoundError: No module named 'PyPDF2.pdf'


Ran 1 test in 0.000s

FAILED (errors=1)

@benkohler
Copy link
Author

py-pdf/pypdf@4b069dd

So as of 2.0.0, it should be PyPDF2. It changes again in 3.1.0 (very new release), you will need "from pypdf"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant